Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable conditional compilation checking on the Rust codebase #94298
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
Changes from all commits
08e1e67
a93c7ab
976fdb1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.