Fix minver and msrv CI: bump cfg_aliases floor and MSRV to 1.70 - #2812
Open
jzuber4 wants to merge 3 commits into
Open
Fix minver and msrv CI: bump cfg_aliases floor and MSRV to 1.70#2812jzuber4 wants to merge 3 commits into
jzuber4 wants to merge 3 commits into
Conversation
nix's build script invokes the `cfg_aliases!` macro. Under `cargo -Zdirect-minimal-versions`, cargo pins the declared floor (0.2.1), whose macro expansion ends in a trailing semicolon in expression position. Current Rust treats that as a hard error, so the build script fails to compile and the `minver` CI job breaks. cfg_aliases 0.2.2 restructured the macro to drop the trailing semicolon. Raising the floor to 0.2.2 makes the minimum-versions build compile. cfg_aliases is a build-dependency only (not part of nix's public API), edition 2018, with no dependencies and no MSRV bump, so nix's consumers and MSRV are unaffected.
nix invokes the `bitflags!` macro through its own `libc_bitflags!`. The current bitflags 2.13 release line emits macro code that triggers a name-resolver ICE in rustc 1.69.0 (`ModuleData::def_id is called on a block module`), which is fixed in rustc 1.70.0. nix commits no Cargo.lock and its resolver is not rust-version aware, so the MSRV CI job resolves the newest bitflags and fails to build on the current MSRV of 1.69. 1.70.0 is the lowest toolchain on which the current dependency set compiles (verified locally: 1.69.0 ICEs, 1.70.0 builds clean). Update rust-version, the CI MSRV, and the README badge and prose to match.
jzuber4
force-pushed
the
fix-ci-minver-msrv
branch
from
August 13, 2026 13:53
0263d7d to
8f8d442
Compare
3 tasks
Raising the MSRV to 1.70 enables `clippy::unnecessary_map_or`, which flags `Result::map_or(false, f)`. `Result::is_ok_and` (stabilized in Rust 1.70) expresses the same check and satisfies the lint.
3 tasks
|
It would be nice to accept it. My PR is red because of the same problems. |
Contributor
|
I don't think we should bump the MSRV for this; it would be better if the |
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.
What does this PR do
Repairs the
minverandmsrvCI jobs, which are currently red onmaster.These are two small, related build-hygiene fixes; they are in one PR because
neither can demonstrate green CI alone —
msrvis gated onminver(
needs: minver), so both are required before themsrvjob can run and pass.1. Raise the minimum
cfg_aliasesbuild-dependency to 0.2.2.build.rsinvokes thecfg_aliases!macro. Undercargo -Zdirect-minimal-versionscargo pins the declared floor (0.2.1), whose macro expansion contains a trailing
semicolon in expression position that current Rust rejects as a hard error, so
the build script fails to compile and
minveris red.cfg_aliases0.2.2restructured the macro to remove it.
cfg_aliasesis a build-dependency only,edition 2018, no dependencies, no MSRV bump — no effect on consumers.
2. Raise the MSRV from 1.69 to 1.70.
nix invokes
bitflags!through its ownlibc_bitflags!. The currentbitflags2.13 release line emits macro code that triggers a name-resolver ICE in rustc
1.69.0 (
`ModuleData::def_id` is called on a block module), fixed in rustc1.70.0. Because nix commits no
Cargo.lockand its resolver is not rust-versionaware, the
msrvjob resolves the newestbitflagsand fails to build on 1.69.1.70.0 is the lowest toolchain on which the current dependency set compiles
(verified locally: 1.69.0 ICEs, 1.70.0 builds clean).
Per the MSRV policy in the README, this implies the next release should be a
minor version bump; I've left the crate
versionfor the maintainers to set atrelease time.
Supersedes #2811 (which contained only the
cfg_aliasesfix; folding the MSRVbump in lets CI go fully green).
Checklist:
CONTRIBUTING.md