Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
jyn514:no-unstable-for-bootstrap
May 22, 2022
Merged

Avoid accidentally enabling unstable features in compilers (take 2)#97277
bors merged 2 commits into
rust-lang:masterfrom
jyn514:no-unstable-for-bootstrap

Conversation

@jyn514

Copy link
Copy Markdown
Member

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

jyn514 commented May 22, 2022

Copy link
Copy Markdown
MemberAuthor

#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
Copy Markdown
Member

@bors r+ rollup=iffy

@bors

bors commented May 22, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 751ad4a has been approved by Mark-Simulacrum

@borsbors 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
Copy Markdown
MemberAuthor

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

@Mark-Simulacrum

Copy link
Copy Markdown
Member

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

@jackh726jackh726 mentioned this pull request May 22, 2022
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:masterMay 22, 2022
@rustbotrustbot 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 emilyalbini/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.
@ehussehuss mentioned this pull request Sep 19, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@jyn514@Mark-Simulacrum@bors@rustbot