Skip to content
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

Avoid accidentally enabling unstable features in compilers (take 2) #97277

Merged
merged 2 commits into from
May 22, 2022

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented May 22, 2022

This allows rustbuild to control whether crates can use nightly features or not.
It also prevents rustbuild from using nightly features itself.

This is #92261, but I fixed the CI error.

This allows rustbuild to control whether crates can use nightly features or not.
It also prevents rustbuild from using nightly features itself.
@jyn514
Copy link
Member Author

jyn514 commented May 22, 2022

#92261 (comment):

Instead it fails because bootstrap unconditionally passes -Z flags to cargo:

Worked around that by passing -Zallow-features=binary-bin-deps. Unfortunately anyhow decides to do feature detection in build.rs 🤦 which breaks when -Zallow-features later disallows it. With backtrace added to allow-features, everything seems to work though :) So we should be able to prevent bootstrap tools from depending on nightly.

This statically prevents issues like rust-lang#59264,
where tools can only be built with the in-tree compiler and not beta.
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented May 22, 2022

📌 Commit 751ad4a has been approved by Mark-Simulacrum

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 22, 2022
@jyn514
Copy link
Member Author

jyn514 commented May 22, 2022

Oops, I pushed 751ad4a right as you reviewed - do you want me to back that out for now?

@Mark-Simulacrum
Copy link
Member

No, I saw it and it seems good to me.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 22, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#97043 (Move some tests to more reasonable directories)
 - rust-lang#97206 (Do leak check after function pointer coercion)
 - rust-lang#97275 (small change)
 - rust-lang#97277 (Avoid accidentally enabling unstable features in compilers (take 2))
 - rust-lang#97280 (Quote replace target in bootstrap configure)

Failed merges:

 - rust-lang#97214 (Finish bumping stage0)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b4c17d4 into rust-lang:master May 22, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 22, 2022
@jyn514 jyn514 deleted the no-unstable-for-bootstrap branch May 22, 2022 20:04
Mark-Simulacrum added a commit to pietroalbini/rust that referenced this pull request Jun 27, 2022
This is a beta-only commit to avoid problems introduced by rust-lang#97277; we will want
a more targeted patch that specifically re-enables this for a subset of the
books (nomicon, unstable book, ...?) and testing via a stable-branch builder for
tools, but that isn't worth backporting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants