Fix sync-variant futures_util handling; regenerate sea-orm-sync#3112
Merged
Conversation
…rm-sync The mock.rs test module imported `futures_util::TryStreamExt` unconditionally, but the sync variant has no futures_util dependency (it uses `StreamShim::try_next` instead, already gated on `feature = "sync"`). A full make-sync regen therefore didn't compile its lib unit tests. Gate the import on `not(feature = "sync")` to match the StreamShim pattern. Also regenerate sea-orm-sync to catch up with recently-merged changes (#2940 docs, #3106 sync warning, #3108 try_getable_array, non_exhaustive).
🎉 Released In 2.0.0-rc.42 🎉Huge thanks for the contribution! |
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.
The
mock.rstest module importedfutures_util::TryStreamExtunconditionally, but the sync variant (sea-orm-sync) has nofutures_utildependency — it usesStreamShim::try_nextinstead (already gated onfeature = "sync"). So a fullmake-syncregen produced a sea-orm-sync whose lib unit tests didn't compile (unresolved import futures_util). CI didn't catch it because the sea-orm-sync job runscargo test --test '*'(integration tests only, not lib unit tests).Fix
Gate the import on
#[cfg(not(feature = "sync"))], mirroring the existing#[cfg(feature = "sync")] use StreamShimright above it. This is a source-level divergence marker (the proper mechanism) rather than a fragile sed rule — a blanket strip in make-sync would orphan the#[cfg(feature = "sqlx-dep")]on the otherTryStreamExtimport instream/query.rs.Also
Regenerated
sea-orm-syncto catch it up with recently-merged changes (#2940, #3106, #3108, non_exhaustive additions).Verified: async
cargo test --libcompiles; a freshmake-sync+cargo teston sea-orm-sync now compiles including lib unit tests.