Skip to content

Check direct minimum versions in CI - #60

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/fix-minimal-versions
Jun 28, 2026
Merged

Check direct minimum versions in CI#60
charliermarsh merged 1 commit into
mainfrom
charlie/fix-minimal-versions

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Jun 28, 2026

Copy link
Copy Markdown
Member

The minimal-versions job currently resolves every transitive dependency to its lowest allowed version, which Cargo does not recommend. This selected rustix 0.37.0 through a development dependency and caused the job to fail on current nightly, even though PubGrub's own dependency bounds were valid.

Switch to direct minimum versions so we validate the lower bounds we declare while resolving transitive dependencies normally. Use nightly only to generate that lockfile, then build and test it with stable Rust. Align the root crate's Serde lower bound with astral-version-ranges so the workspace has one consistent direct minimum.

The resulting direct-minimum dependency graph builds and passes all workspace tests with all features; the normal locked graph does as well.

@codspeed-hq

codspeed-hq Bot commented Jun 28, 2026

Copy link
Copy Markdown

Congrats! CodSpeed is installed 🎉

🆕 6 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

@charliermarsh
charliermarsh force-pushed the charlie/fix-minimal-versions branch from e4a4f05 to 5ebb5a4 Compare June 28, 2026 15:47
@charliermarsh charliermarsh changed the title Do not use nightly in minimal-versions check Check direct minimum versions in CI Jun 28, 2026
@charliermarsh
charliermarsh marked this pull request as ready for review June 28, 2026 15:56
@charliermarsh
charliermarsh merged commit 7866976 into main Jun 28, 2026
11 checks passed
konstin pushed a commit that referenced this pull request Jun 28, 2026
The minimal-versions job currently resolves every transitive dependency
to its lowest allowed version, which [Cargo does not
recommend](https://doc.rust-lang.org/cargo/reference/unstable.html#minimal-versions).
This selected `rustix 0.37.0` through a development dependency and
caused the job to fail on current nightly, even though PubGrub's own
dependency bounds were valid.

Switch to direct minimum versions so we validate the lower bounds we
declare while resolving transitive dependencies normally. Use nightly
only to generate that lockfile, then build and test it with stable Rust.
Align the root crate's Serde lower bound with `astral-version-ranges` so
the workspace has one consistent direct minimum.

The resulting direct-minimum dependency graph builds and passes all
workspace tests with all features; the normal locked graph does as well.
Comment thread .github/workflows/ci.yml
- run: cargo build --workspace

- run: cargo +nightly test --all-features --workspace
- run: cargo test --all-features --workspace

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We added half of that fix in pubgrub-rs#426 previously, I now rebased main onto upstream dev which makes this part disappear.

konstin added a commit that referenced this pull request Jun 28, 2026
The minimal-versions job currently resolves every transitive dependency
to its lowest allowed version, which [Cargo does not
recommend](https://doc.rust-lang.org/cargo/reference/unstable.html#minimal-versions).
This selected `rustix 0.37.0` through a development dependency and
caused the job to fail on current nightly, even though PubGrub's own
dependency bounds were valid.

Switch to direct minimum versions so we validate the lower bounds we
declare while resolving transitive dependencies normally. Use nightly
only to generate that lockfile, then build and test it with stable Rust.
Align the root crate's Serde lower bound with `astral-version-ranges` so
the workspace has one consistent direct minimum.

The resulting direct-minimum dependency graph builds and passes all
workspace tests with all features; the normal locked graph does as well.

Co-authored-by: Charlie Marsh <crmarsh416@gmail.com>
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.

2 participants