Repository navigation
Conversation
Remove unconditional migration features from the facade and macro support dependencies. Instead, forward migration support to sqlx-core and enabled database drivers only when the public migrate feature is selected. This preserves existing migrate and CLI behavior while allowing no-default-features consumers to omit migration checksum dependencies. Closes: transact-rs#4418 Signed-off-by: S茅bastien Han <seb@redhat.com>
10 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove unconditional migration features from the facade and macro-support dependencies.
Migration support is now forwarded to
sqlx-coreand enabled database drivers only when the publicmigratefeature is selected. This preserves existing migration and CLI behavior while allowingno-default-featuresconsumers to omit migration checksum dependencies.Does your PR solve an issue?
Closes #4418
Is this a breaking change?
No intended public API break.
Users explicitly enabling
migrate, as well as users relying on SQLx鈥檚 default features, retain the existing behavior. Downstream builds relying on accidental transitive activation of migration support will need to enablemigrateexplicitly.Testing
Validated that:
sqlx-core/migrate,sha2, andcrc.migrateactivates migration support forsqlx-coreand every enabled driver.Commands run include:
cargo fmt --all -- --checkcargo test -p sqlx-core --all-featurescargo test -p sqlx-macros-core --all-featurescargo test -p sqlx --lib --all-featurescargo check -p sqlx-cli --all-featurescargo clippy -p sqlx --no-default-features --features all-databases,macros -- -D warningsNo conventional Rust regression test was added because the regression concerns Cargo鈥檚 resolved feature and dependency graph, which cannot be inspected from a unit test after compilation. The negative and positive feature combinations were instead verified directly with
cargo treeandcargo check.