Skip to content

ci: raise is-terminal and tempfile dev floors so minimal-versions builds on nightly#428

Closed
RyanJamesStewart wants to merge 1 commit into
pubgrub-rs:devfrom
RyanJamesStewart:ci/minimal-versions-rustix-floor
Closed

ci: raise is-terminal and tempfile dev floors so minimal-versions builds on nightly#428
RyanJamesStewart wants to merge 1 commit into
pubgrub-rs:devfrom
RyanJamesStewart:ci/minimal-versions-rustix-floor

Conversation

@RyanJamesStewart

Copy link
Copy Markdown

The Minimal versions CI job (cargo +nightly update -Zminimal-versions then build and test) is latently broken. Under minimal versions, two dev-dep paths resolve rustix 0.37: codspeed-criterion-compat -> is-terminal 0.4.6 and proptest -> tempfile. rustix below 0.38.6 relies on the rustc_layout_scalar_valid_range_start attribute, which the compiler removed in rust-lang/rust#155433, so it no longer compiles on current nightly (tracked in bytecodealliance/rustix#1620). The job only still passes because it has not re-run on a post-removal nightly.

This raises two dev-dep floors so minimal versions resolves a buildable rustix. is-terminal = "0.4.8" moves the codspeed path off the rustix 0.37 line, and tempfile = "3.9" raises the proptest path to rustix 0.38.26 (the lowest tempfile floor whose rustix builds; tempfile 3.7 and 3.8 still resolve the unbuildable rustix 0.38.0). No direct rustix floor is added, so the normal latest-versions resolution is unchanged and keeps a single rustix.

Verified locally on nightly 2026-05-12:

  • with -Zminimal-versions, rustix resolves to a single 0.38.26 and cargo build --workspace plus cargo test --all-features --workspace pass;
  • the latest-versions build is unaffected (single rustix 1.1.4, tests pass).

The astral-sh/pubgrub fork hit the same breakage; the fix there (astral-sh#55) was redirected here so the fork can rebase on top.

The `Minimal versions` job (`cargo +nightly update -Zminimal-versions`
then build and test) is latently broken. Under minimal versions two
dev-dep paths resolve rustix 0.37: `codspeed-criterion-compat ->
is-terminal 0.4.6` and `proptest -> tempfile`. rustix below 0.38.6 uses
the `rustc_layout_scalar_valid_range_start` attribute, which the
compiler removed in rust-lang/rust#155433, so it no longer compiles on
current nightly (tracked in bytecodealliance/rustix#1620). The job only
still passes because it has not re-run on a post-removal nightly.

Raise two dev-dep floors so minimal versions resolves a buildable
rustix. `is-terminal = "0.4.8"` moves the codspeed path off the rustix
0.37 line, and `tempfile = "3.9"` raises the proptest path to rustix
0.38.26 -- the lowest tempfile floor whose rustix builds, since
tempfile 3.7 and 3.8 still resolve the unbuildable rustix 0.38.0. No
direct rustix floor is added, so the normal latest-versions resolution
is unchanged and keeps a single rustix.

Verified on nightly 2026-05-12: with `-Zminimal-versions`, rustix
resolves to a single 0.38.26 and `cargo build --workspace` plus
`cargo test --all-features --workspace` pass; the latest-versions build
is unaffected (single rustix 1.1.4, tests pass).
@konstin

konstin commented Jun 23, 2026

Copy link
Copy Markdown
Member

Can you please share the exact commands that reproduce the breakage? CI on main is clean, and it doesn't reproduce for me locally.

@RyanJamesStewart

Copy link
Copy Markdown
Author

You're right that it doesn't reproduce on dev, and I tracked down why. The minimal-versions job runs the update step with +nightly but builds and tests on stable (cargo build / cargo test), and that split is what keeps it green.

Under -Zminimal-versions, dev resolves a single rustix 0.37.0 (pulled by is-terminal 0.4.6; tempfile minimizes to 3.0.2, which predates rustix, so it adds no rustix path here). rustix 0.37 uses the rustc_layout_scalar_valid_range_start attribute that rust-lang/rust#155433 removed, but only when it is compiled by a nightly rustc. On stable it compiles fine, so the job passes.

Exact commands on a clean dev checkout (nightly 2026-05-12 or later):

cargo +nightly update -Zminimal-versions

# the CI steps, on stable: both pass
cargo build --workspace
cargo test --all-features --workspace

# compile that same dev-dep on nightly: fails
cargo +nightly test --all-features --workspace

The last command gives:

error: cannot find attribute `rustc_layout_scalar_valid_range_start` in this scope
error: could not compile `rustix` (lib) due to 4 previous errors

So the breakage is nightly-only, and the pubgrub-rs job never compiles a dev-dependency on nightly, which is why CI on main is clean. Where I actually hit it was the astral-sh fork, whose minimal-versions job uses cargo +nightly build / cargo +nightly test, so it builds rustix on nightly and fails (fixed on the fork in astral-sh#55).

Given that, this PR is not needed for dev as the job stands today, and I am happy to close it. The one alternative worth flagging: if you would want the minimal-versions job to also catch this class of nightly-only dev-dep rot, switching its build and test steps to +nightly would surface it, and then these floor bumps would be the fix that keeps it green. Your call on whether that is worth it; otherwise I will close.

@konstin

konstin commented Jun 24, 2026

Copy link
Copy Markdown
Member

As nightly is unstable, we shouldn't add fixes specifically for nightly and minimal versions.

@konstin konstin closed this Jun 24, 2026
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