-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent run-make
test recipes (rmake.rs
) from using *any* unstable features
#137532
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
This was referenced Feb 24, 2025
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Mar 7, 2025
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 7, 2025
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Mar 8, 2025
Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 8, 2025
Rollup merge of rust-lang#137537 - jieyouxu:daily-rmake, r=Kobzol Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do Addresses (mostly) rust-lang#137532. Follow-up to rust-lang#137373. ### Summary - Fix 3 run-make tests that currently use unstable features: 1. `tests/run-make/issue-107495-archive-permissions/rmake.rs` uses `#![feature(rustc_private)]` for `libc` on `unix`, but `run_make_support` already exports `libc`, so just use that. 2. `tests/run-make/cross-lang-lto/rmake.rs` uses `#![feature(path_file_prefix)]` for convenience, replaced with similar filename prefix logic. 3. `tests/run-make/broken-pipe-no-ice/rmake.rs` uses `#![feature(anonymous_pipe)]` for anonymous pipes. This is more complicated[^race-condition], and I decided to temporarily introduce a dependency on [`os_pipe`] before std's `anonymous_pipe` library feature is stabilized[^pipe-stab]. I left a FIXME tracked by rust-lang#137532 to make the switch once `anonymous_pipe` stabilizes and reaches beta. - Use `RUSTC_BOOTSTRAP=-1` when building `rmake.rs` to have the stage 0 rustc reject any unstable features used in `rmake.rs`. - The requirement that `rmake.rs` may not use any unstable features is now documented in rustc-dev-guide. - This PR does not impose `RUSTC_BOOTSTRAP=-1` when building `run-make-support`, but I suppose we could. r? `@Kobzol` try-job: x86_64-msvc-1 try-job: x86_64-mingw-1 [`os_pipe`]: https://github.com/oconnor663/os_pipe.rs [^race-condition]: We can't just try to spawn `rustc` and immediate close the stderr handle because of race condition, as there's no guarantee `rustc` will not try to print to stderr before the handle gets closed. [^pipe-stab]: In-progress stabilization PR over at rust-lang#135822.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Three
rmake.rs
useunstable
features that cannot be used (because they need to be build by the stage0 compiler which usually is not a nightly compiler), and needs to be fixed (this was a bug in the previous infra implementation and partially rectified in #137373):tests/run-make/issue-107495-archive-permissions/rmake.rs
:rust/tests/run-make/issue-107495-archive-permissions/rmake.rs
Line 1 in f43e549
tests/run-make/cross-lang-lto/rmake.rs
:rust/tests/run-make/cross-lang-lto/rmake.rs
Line 6 in f43e549
tests/run-make/broken-pipe-no-ice/rmake.rs
:rust/tests/run-make/broken-pipe-no-ice/rmake.rs
Line 14 in f43e549
After these tests are fixed and #137373 merges, we need to:
rmake.rs
withRUSTC_BOOTSTRAP=-1
to prevent any nightly feature usages withinrmake.rs
recipes by convincing the stage 0 compiler used to buildrmake.rs
that it is a stable-channel compiler.FIXME
os_pipe
withanonymous_pipe
once it stabilizes and reaches beta. cf. Stabilizeanonymous_pipe
#135822 or Stablize anonymous pipe #137793.The text was updated successfully, but these errors were encountered: