build(deps): sea-query 1.0 + sea-query-sqlx 0.8 - #252
Merged
Conversation
Dependabot's #250 could not merge on its own: sea-query-binder 0.7 pins sea-query ^0.32, so bumping sea-query alone fails to resolve. Upstream superseded sea-query-binder with a renamed crate, sea-query-sqlx, which is what unblocks it. Picked sea-query-sqlx 0.8.1 over 0.9.x deliberately: 0.8.x is the line that still targets sqlx ^0.8 and declares rust-version 1.88.0, so sqlx stays on 0.8 and the MSRV 1.88 promise holds. 0.9 moves to sqlx 0.9 and Rust 1.94 — a separate, larger decision. Cargo says as much when it resolves ("available: v0.9.1, requires Rust 1.94.0"). The port, all of it compiler- or clippy-driven rather than hand-hunted: - sea_query_binder:: -> sea_query_sqlx:: (31 sites). The binder type only ever appears behind storage::build_sqlx and the DbPool/DbTransaction execute helpers, so this is a rename and nothing more. build_any_sqlx was dropped in 0.8 (sea-query 1.0 replaced `dyn QueryBuilder` with `impl QueryBuilder`), but Orion never used it — build_sqlx already matches on DbBackend and calls the monomorphised builder. - The comparison operators moved off Expr onto the ExprTrait trait, so 11 modules and 2 test files gained `use sea_query::ExprTrait;`. Without it `.eq()` silently resolves to PartialEq::eq, which is why the first check reported "expected Expr, found bool". - ExprTrait is blanket-implemented for everything convertible into an Expr, which makes a bare `.max(0)` on an i64 ambiguous with Ord::max (E0034). Four sites now spell it Ord::max(a, b). - Expr::cust takes Into<Cow<'static, str>> in 1.0. trace_dlq threaded non-'static &str through it: `now` is only ever helpers::sql_now, so it is typed &'static str; `lease_until` comes from sql_now_plus_secs as an owned String, so those two sites clone. Signatures of the pinned golden-SQL helpers keep their literal arguments either way. - SimpleExpr is now a plain alias of Expr and From<Expr> for SimpleExpr is gone, so 62 `Expr::val(x).into()` calls became identity conversions and tripped clippy::useless_conversion under -D warnings. Applied via `cargo clippy --fix`; it correctly left the real &str/bool -> Expr conversions in connectors.rs, cluster.rs and packages.rs alone. - Value variants are unboxed: one test assertion drops a Box::new. schema.rs needed no change — all 11 Iden enums use the derive, which still snake_cases variants, and Iden::to_string survives, so the pinned column-identifier test holds. Nothing here matches on ColumnRef/TableRef, so 1.0's AST rework and new #[non_exhaustive] are inert. Deliberately not done: renaming SimpleExpr to Expr (the alias is not deprecated), and turning Alias::new(x) into bare x — Iden is implemented for &'static str only, and that path skips identifier escaping. No golden SQL assertion changed. 1.0 renders byte-identical SQL for everything Orion builds, on all three dialects. Dependency graph shrinks: sea-query 1.0.2 has no mandatory dependencies, dropping `inherent` and `postgres-types`. sea-query-sqlx lists jiff-sqlx (Unlicense OR MIT) as optional behind with-jiff, which is off, so it lands in the lock but is never compiled; noted in the manifest since Unlicense is not in deny.toml's allowlist and it clears only via the MIT arm. cargo deny: advisories, bans, licenses, sources all ok. Verified: fmt; clippy --workspace --all-targets -D warnings; the full workspace suite and --doc; cargo deny; cargo package --locked --workspace (verify-builds all four crates); rustdoc -D warnings; and the whole suite again on Rust 1.88 for the MSRV job. Postgres/MySQL rendering is only executed under Docker, so those ran too: storage_postgres, storage_mysql, schema_parity, cluster (17) and the container-backed integration set (26) are green, as is e2e (75). One caveat: the Kafka container tests are flaky at default parallelism on this machine — failures are producer-side MessageTimedOut before any SQL runs, the count varied run to run, and all 20 pass with --test-threads=2. That is the contention ci.yml already predicts for this step, not a regression from this change, but the CI job runs without that flag. MSRV headroom is now zero: sea-query, sea-query-derive and sea-query-sqlx all declare exactly 1.88.0.
shankar-gpio
added a commit
that referenced
this pull request
Aug 14, 2026
…253) cargo-mutants v27.1.0 (2026-06-02) links its prebuilt binaries against glibc 2.39. ubuntu-22.04 carries 2.35, so install-action fetched the binary, verified its checksum, and then could not run it: cargo-mutants: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by cargo-mutants) That failed the job on PR #252 before a single mutant was generated, and would have failed every PR from here on. The repo-wide ubuntu-22.04 pin exists so shipped binaries stay loadable on older glibc. This job ships nothing — it builds mutants and throws them away — so the pin buys it nothing while costing it the tool. Bump the runner rather than pinning an older cargo-mutants, which keeps the tool on `latest` like every other install-action call in ci.yml and does not re-break when 22.04 falls further behind. Claude-Session: https://claude.ai/code/session_01DNWvvwKcgrpc15bsSNdXhY
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.
Supersedes #250 — that PR can be closed once this lands.
Why #250 was stuck
Bumping sea-query alone cannot resolve:
sea-query-binder 0.7pinssea-query ^0.32. Upstream supersededsea-query-binderwith a renamed crate,sea-query-sqlx, which is what unblocks the upgrade.Version choice
sea-querysea-query-binder→sea-query-sqlxsea-query-sqlx0.8.1, not 0.9.x, on purpose: 0.8.x is the line that still targetssqlx ^0.8and declaresrust-version = 1.88.0. So sqlx stays on 0.8 and the MSRV 1.88 promise inCLAUDE.mdholds. 0.9 moves to sqlx 0.9 + Rust 1.94 — a separate, larger decision. Cargo says so itself while resolving:available: v0.9.1, requires Rust 1.94.0.The port
Compiler- and clippy-driven throughout, not hand-hunted:
storage::build_sqlxand theDbPool/DbTransactionexecute helpers, so it is a rename and nothing else.build_any_sqlxwas removed in 0.8 (1.0 replaceddyn QueryBuilderwithimpl QueryBuilder), but Orion never used it —build_sqlxalready matches onDbBackendand calls the monomorphised builder.ExprTrait: comparison operators moved offExpronto a trait, so 11 modules and 2 test files gaineduse sea_query::ExprTrait;. Without it.eq()resolves toPartialEq::eq, which is why the first check reportedexpected Expr, found bool.Ord::maxvsExprTrait::max:ExprTraitis blanket-implemented for everything convertible into anExpr, so a bare.max(0)on ani64becomes ambiguous (E0034). Four sites now spell itOrd::max(a, b).Expr::custtakesInto<Cow<'static, str>>.trace_dlqthreaded non-'static&strthrough it:nowis only everhelpers::sql_now, so it is typed&'static str;lease_untilarrives fromsql_now_plus_secsas an ownedString, so those two sites clone.SimpleExpris now an alias ofExprandFrom<Expr> for SimpleExpris gone, so 62Expr::val(x).into()calls became identity conversions and trippedclippy::useless_conversionunder-D warnings. Applied withcargo clippy --fix; it correctly left the real&str/bool→Exprconversions alone.Valuevariants are unboxed: one test assertion drops aBox::new.schema.rsneeded no change — all 11Idenenums use the derive, which still snake_cases variants, andIden::to_stringsurvives, so the pinned column-identifier test holds. Nothing matches onColumnRef/TableRef, so 1.0's AST rework and new#[non_exhaustive]are inert.Deliberately not done: renaming
SimpleExpr→Expr(the alias is not deprecated), and turningAlias::new(x)into barex—Idenis implemented for&'static stronly, and that path skips identifier escaping.No golden SQL assertion changed. 1.0 renders byte-identical SQL for everything Orion builds, on all three dialects.
Dependencies
The graph shrinks: sea-query 1.0.2 has no mandatory dependencies, dropping
inherentandpostgres-types.sea-query-sqlxlistsjiff-sqlx(Unlicense OR MIT) as optional behindwith-jiff, which is off — so it lands inCargo.lockbut is never compiled. Noted in the manifest, sinceUnlicenseis not indeny.toml's allowlist and it clears only via theMITarm.cargo deny: advisories, bans, licenses, sources — all ok.Verification
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --all-targetscargo test --doccargo deny checkcargo package --locked --workspaceRUSTDOCFLAGS="-D warnings" cargo doccargo +1.88 test --workspacestorage_postgres/storage_mysql/schema_paritycluster(Docker)tests/e2e/run.shPostgres/MySQL rendering is only executed under Docker, so those suites were run rather than left to CI.
Two things for the reviewer
MessageTimedOutbefore any SQL runs, the count varied run to run (7, then 2), and all 20 pass with--test-threads=2. That is the contentionci.ymlalready predicts for this step, not a regression from this change — but the CI job runs without that flag, so it may need the flag added.sea-query,sea-query-deriveandsea-query-sqlxall declare exactly1.88.0. Any future 1.0.x patch that raisesrust-versionwill break themsrvjob on the nextcargo update.