-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
emit feature help in cheat mode (fix nightlies) #36678
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
The failure, for the record:
|
Whew, it took me a while to understand what was going on here:
So this fixes it by changing feature_gate to emit the help any time the compiler is instructed to disable feature gating, meaning when the bootstrap key is set during the stable build, as is happening here in distcheck. In isolation I think this is a reasonable thing to do, so we should do it to fix this problem. We don't strictly need to duplicate the Now, I don't think this error should have happened at all in distcheck, and that's why I said earlier that "distcheck running as a stable build is ... in retrospect incorrect". We started doing that in this PR. Anytime the build happens from the tarball But that doesn't invalidate the need for this patch. Even if we were to revert that patch we would still hit this problem when doing the beta/stable builds down the road - the compiler needs to always produce consistent results when running the test suite, and at the moment that means always pretending it's a "nightly" compiler. I'll file a separate bug about this. |
Here's the bug about the tarball config being incorrect: #36690 |
Ah, sorry for not explaining the issue / fix a bit more.
I don't mind trying that (and event though about it but didn't have the time to that). Also I think passing through a I can likely do this this afternoon / evening (CEST). |
@brson: I updated the PR by passing a This also includes some |
☔ The latest upstream changes (presumably #36616) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
📌 Commit f0e1738 has been approved by |
sgtm |
emit feature help in cheat mode (fix nightlies) This should fix the `distcheck` failure in the latest nightly. cc #36539 It's probably not ideal to check the environment that often and the code ist duplicated from `librustc/session/config.rs` but this was the easiest fix I could think of. A cleaner solution would probably be to move the `unstable_features` from `Options` to `ParseSess` and change the `diag` parameter of `emit_feature_err` to take `ParseSess` instead of a `Handler`.
This should fix the
distcheck
failure in the latest nightly.cc #36539
It's probably not ideal to check the environment that often and the code ist duplicated from
librustc/session/config.rs
but this was the easiest fix I could think of.A cleaner solution would probably be to move the
unstable_features
fromOptions
toParseSess
and change thediag
parameter ofemit_feature_err
to takeParseSess
instead of aHandler
.