-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Enable conditional compilation checking on the Rust codebase #94298
Conversation
This comment has been minimized.
This comment has been minimized.
6eb65c8
to
2706001
Compare
This comment has been minimized.
This comment has been minimized.
CI failure is unrelated to my changes and will most certainly will be fixed by #94290. |
2706001
to
3c856e4
Compare
This comment has been minimized.
This comment has been minimized.
3c856e4
to
ad3895a
Compare
This comment has been minimized.
This comment has been minimized.
I didn't expect it but it seems that the |
07ed339
to
ff91509
Compare
@bors r+ rollup=iffy Thanks, this looks great. |
📌 Commit ff9150997362e09ea4a0ee82766ba27fef180522 has been approved by |
⌛ Testing commit ff9150997362e09ea4a0ee82766ba27fef180522 with merge a761f89db6cc66a453172fc129832370421fc1ac... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
ff91509
to
042ffaf
Compare
I miss the However I don't think this will pass because |
Yes, I would add it to our list here. |
bcc955e
to
97cde42
Compare
This comment has been minimized.
This comment has been minimized.
97cde42
to
e9a26cd
Compare
This comment has been minimized.
This comment has been minimized.
e9a26cd
to
9e55555
Compare
This comment has been minimized.
This comment has been minimized.
9e55555
to
c53e96f
Compare
Finally! I had to add more exceptions, mainly for dependencies. This is ready for another review. @Mark-Simulacrum would you happen to know why I don't get those error locally ? @rustbot ready |
☔ The latest upstream changes (presumably #94588) made this pull request unmergeable. Please resolve the merge conflicts. |
c53e96f
to
d86dbb8
Compare
d86dbb8
to
976fdb1
Compare
// FIXME: Used by crossbeam-utils, but we should not be triggering on external dependencies. | ||
(Some(Mode::Rustc), "crossbeam_loom", None), | ||
(Some(Mode::ToolRustc), "crossbeam_loom", None), | ||
// FIXME: Used by proc-macro2, but we should not be triggering on external dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to document this in the tracking issue for this feature, and consider if there's some kind of crate-level opt-in that can be added -- I suspect in many cases folks will want to have this sort of crate-private cfg without end users needing to opt-in to it.
It's also the case that the proc-macro2 library for example I think intends for this to be used by users, but doesn't expose it as a Cargo feature to avoid accidental use (e.g., by a library that enables that feature), forcing the 'last' user to actually pass the relevant cfg.
I think this is fine for this PR but we should consider this as part of the feature development process, especially if and when stabilization is considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes absolutely, it should be mentioned. I don't have the permissions to edit it but fell free to do so.
I would also mention that were are getting those because we are using RUSTFLAGS
which applies to all crates instead of just the one we control. We are currently forced to do it this way because the cargo integration isn't done or even design. It wasn't really discus in the RFC as it was put in the unresolved section with all the cargo stuff. Nevertheless I have some ideas about how we could have a better integration with cargo.
@bors r+ rollup=never |
📌 Commit 976fdb1 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (5a7e4c6): comparison url. Summary: This benchmark run did not return any relevant results. 1 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
This pull-request enable conditional compilation checking on every rust project build by the
bootstrap
tool.To be more specific, this PR only enable well known names checking + extra names (bootstrap, parallel_compiler, ...).
r? @Mark-Simulacrum