Conversation
…st assertions When both sqlite and postgres features are enabled (e.g. cargo test --workspace --all-features --lib --bins --no-run), the compile_error! guard in lib.rs prevented compilation. postgres now takes priority when both are active, consistent with the cfg guards already used throughout the codebase. Changes: - Remove #[cfg(all(feature="sqlite", feature="postgres"))] compile_error! from lib.rs; keep the no-feature guard - Fix two test assertions in lib.rs to use #[cfg(all(feature="sqlite", not(feature="postgres")))] so they do not conflict with the postgres assertion when both features are active - Add missing # Errors doc sections to the postgres variants of run_migrations (migrate.rs) and begin_write (transaction.rs), which were previously unreachable by clippy due to the compile error - Fix doc_markdown clippy warning in driver/postgres.rs and lib.rs - Update Cargo.toml comment to reflect the new priority semantics Closes #2734
e3dea8e to
692e599
Compare
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
compile_error!guard inzeph-db/src/lib.rsthat blocked compilation when bothsqliteandpostgresfeatures were simultaneously active (e.g.cargo test --workspace --all-features)postgresnow takes priority when both are enabled, consistent with the#[cfg(all(feature = "sqlite", not(feature = "postgres")))]pattern already used throughout the codebaselib.rsthat used bare#[cfg(feature = "sqlite")]— they now correctly yield to postgres when both are active# Errorsdoc sections to thepostgresvariants ofrun_migrationsandbegin_write, which were previously unreachable by clippy due to the compile errorTest plan
cargo test -p zeph-db --all-features --lib --no-runcompiles cleanlycargo clippy -p zeph-db --all-features -- -D warningspassescargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 7992 passedCloses #2734