library/test: always enable unstable features for miri#153369
library/test: always enable unstable features for miri#153369cuviper wants to merge 1 commit intorust-lang:mainfrom
Conversation
The unstable features of the `test` crate used to be default-enabled, and manually disabled when building the beta and stable channels. Commit dae8ea9 flipped that to default-disabled, only enabled for nightly and dev channels. However, this broke miri testing on the beta/stable channels, because it also uses unstable features -- which should be fine to enable just for its own sysroot build. Now the `test` build script makes that happen by noticing the `MIRI_CALLED_FROM_SETUP` environment variable.
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
1.95-beta is currently blocked on this problem: #153314 (comment) @rustbot label +beta-nominated |
|
I looked at this again and I guess that this is a natural consequence of flipping the default, before we used to use unstable features in some places "by accident", such as in Miri, while they need an explicit opt-in. Would be nicer to set this for Miri tests from bootstrap, rather than in the build probe, but I guess that this would still break miri when executed outside of bootstrap? I think that as a hotfix for beta this is good enough. You can r=me if you tested that this unblocks the beta build (the miri test on stable/beta). |
Yes, I think a bootstrap-only fix would break miri elsewhere -- except we don't ship miri on stable or beta anyway. So maybe that's fine, although I'm not sure how else bootstrap would help this, because it has to do with how miri builds |
[beta] prepare Rust 1.95.0-beta Ref: https://forge.rust-lang.org/release/process.html#beta-pr - Replace version placeholders with 1.95.0 - Bump to beta release - library/test: always enable unstable features for miri #153369 r? cuviper
The unstable features of the
testcrate used to be default-enabled,and manually disabled when building the beta and stable channels. Commit
dae8ea9 flipped that to default-disabled, only enabled for nightly
and dev channels.
However, this broke miri testing on the beta/stable channels, because it
also uses unstable features -- which should be fine to enable just for
its own sysroot build. Now the
testbuild script makes that happen bynoticing the
MIRI_CALLED_FROM_SETUPenvironment variable.