Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix glob resolution issue #3898

Open
wants to merge 1 commit into
base: 1.4.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion diesel_migrations/migrations_internals/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ where
}

fn latest_run_migration_version(&self) -> QueryResult<Option<String>> {
use diesel::dsl::max;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diesel::dsl has re-exported an ambiguous max, one exported from dsl::helper_types::* and another from dsl::expression::dsl, see: https://github.com/diesel-rs/diesel/blob/1.4.x/diesel/src/lib.rs#L220-L224

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern continues to exist in diesel 2.0. See #3745 for some discussion around that. As it is hard to completely remove this bug without doing a breaking change (and therefore a major version bump) what's the impact on that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern continues to exist in diesel 2.0

The regression test report doesn't indicate any regression in diesel@2.0, so I need to investigate further to determine if it's truly identical to 1.4.x.

use diesel::expression::dsl::max;
__diesel_schema_migrations.select(max(version)).first(self)
}

Expand Down
Loading