Skip to content

Fix sync-variant futures_util handling; regenerate sea-orm-sync#3112

Merged
tyt2y3 merged 1 commit into
masterfrom
chore/fix-make-sync-futures-util
Jul 3, 2026
Merged

Fix sync-variant futures_util handling; regenerate sea-orm-sync#3112
tyt2y3 merged 1 commit into
masterfrom
chore/fix-make-sync-futures-util

Conversation

@tyt2y3

@tyt2y3 tyt2y3 commented Jul 3, 2026

Copy link
Copy Markdown
Member

The mock.rs test module imported futures_util::TryStreamExt unconditionally, but the sync variant (sea-orm-sync) has no futures_util dependency — it uses StreamShim::try_next instead (already gated on feature = "sync"). So a full make-sync regen 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 runs cargo 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 StreamShim right 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 other TryStreamExt import in stream/query.rs.

Also

Regenerated sea-orm-sync to catch it up with recently-merged changes (#2940, #3106, #3108, non_exhaustive additions).

Verified: async cargo test --lib compiles; a fresh make-sync + cargo test on sea-orm-sync now compiles including lib unit tests.

…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).
@tyt2y3 tyt2y3 merged commit 329ad61 into master Jul 3, 2026
39 checks passed
@tyt2y3 tyt2y3 deleted the chore/fix-make-sync-futures-util branch July 3, 2026 11:21
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

🎉 Released In 2.0.0-rc.42 🎉

Huge thanks for the contribution!
This feature has now been released, so it's a great time to upgrade.
Show some love with a ⭐ on our repo, every star counts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant