fix: repair CI lints and failing unit tests on master - #28
Merged
Liam Farrelly (lfarrel6) merged 1 commit intoSep 3, 2026
Merged
Conversation
The Clippy and Unit Test jobs are red on master, independent of any dependency bump. Three unrelated causes: Clippy (stable is now 1.98, where `unnecessary_unwrap` also fires on `as_ref().unwrap()`, plus `useless_borrows_in_formatting` and `useless_conversion` hits): - `active_model_ex.rs` / `model_ex.rs`: bind the `LitStr` with a pattern instead of re-checking `is_some()` and unwrapping. - `statement.rs`, `helper.rs`, `sea-orm-cli/commands/migrate.rs`: drop the redundant borrows in `write!`/`format!` and the redundant `into_iter()`. Unit Test, `cargo test --workspace` failed to compile with `cannot find register_entity in sea_orm`. `DeriveEntity` gates the registry submission on `sea-orm-macros`' own `entity-registry` feature, but the proc-macro crate is resolved once for the whole build while `sea-orm` is not, so the macro can emit `sea_orm::register_entity!` into a `sea-orm` built without the feature. `sea-orm` (and its `sea-orm-sync` mirror) now provide a no-op `register_entity!` in that configuration, so the generated code compiles either way. `cargo test --features entity-registry` also failed to build the integration tests: the submission named `Entity` as a value and hardcoded that name, which breaks for an entity struct with fields, such as `tests/common/features/dyn_table_name.rs`. Use the derived ident, and skip entities that are not unit structs — those have no static schema to register. Finally, `examples/quickstart` goes back to being its own workspace. As a member it unified `sqlx-sqlite`, `runtime-tokio`, `schema-sync` and `entity-registry` into `sea-orm`'s own test targets, which made the Unit Test job compile and run the database integration tests, and those need a `DATABASE_URL` that the job does not set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013LqKqpvKd1hWCpWvAZeQmn
Member
Author
|
Noticed CI was failing on an automated dependency patch for the JS example projects for unrelated Rust changes. |
Agni (a4n1)
approved these changes
Sep 3, 2026
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 Clippy and Unit Test jobs are red on master, independent of any
dependency bump. Three unrelated causes:
Clippy (stable is now 1.98, where
unnecessary_unwrapalso fires onas_ref().unwrap(), plususeless_borrows_in_formattinganduseless_conversionhits):active_model_ex.rs/model_ex.rs: bind theLitStrwith a patterninstead of re-checking
is_some()and unwrapping.statement.rs,helper.rs,sea-orm-cli/commands/migrate.rs: drop theredundant borrows in
write!/format!and the redundantinto_iter().Unit Test,
cargo test --workspacefailed to compile withcannot find register_entity in sea_orm.DeriveEntitygates the registrysubmission on
sea-orm-macros' ownentity-registryfeature, but theproc-macro crate is resolved once for the whole build while
sea-ormisnot, so the macro can emit
sea_orm::register_entity!into asea-ormbuilt without the feature.
sea-orm(and itssea-orm-syncmirror) nowprovide a no-op
register_entity!in that configuration, so the generatedcode compiles either way.
cargo test --features entity-registryalso failed to build theintegration tests: the submission named
Entityas a value and hardcodedthat name, which breaks for an entity struct with fields, such as
tests/common/features/dyn_table_name.rs. Use the derived ident, and skipentities that are not unit structs — those have no static schema to
register.
Finally,
examples/quickstartgoes back to being its own workspace.As a member it unified
sqlx-sqlite,runtime-tokio,schema-syncandentity-registryintosea-orm's own test targets, which made the UnitTest job compile and run the database integration tests, and those need a
DATABASE_URLthat the job does not set.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_013LqKqpvKd1hWCpWvAZeQmn