-
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
Make deprecated_cfg_attr_crate_type_name a hard error #129670
Conversation
☔ The latest upstream changes (presumably #129665) made this pull request unmergeable. Please resolve the merge conflicts. |
ccaaab0
to
23d40df
Compare
@rfcbot fcp merge We discussed this is the meeting today and were feeling positively toward it. |
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@rfcbot reviewed This seems like a good simplification, but we should notify crate authors that may be affected with at least a ping. I'd like to know if there is truly no way to support their use case. |
Documenting some supporting rationale:
|
Based on a google code search, I want to give a headsup to
|
The usage in wasmer seems to be entirely ineffective:
No On the other hand even if I remove |
Deny, | ||
"detects usage of `#![cfg_attr(..., crate_type/crate_name = \"...\")]`", | ||
@future_incompatible = FutureIncompatibleInfo { | ||
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps, |
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.
So this has not gone through a "report in deps" stage. Fine for me, but I just wanted to call it out for awareness.
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.
I think with the low usage it has in the ecosystem, the step can be skipped.
23d40df
to
5879827
Compare
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
5879827
to
00ed47b
Compare
☀️ Test successful - checks-actions |
Finished benchmarking commit (8422e27): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 2.4%, secondary -0.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 773.691s -> 774.004s (0.04%) |
Turns the forward compatibility lint added by #83744 into a hard error, so now, while the
#![crate_name]
and#![crate_type]
attributes are still allowed in raw form, they are now forbidden to be nested inside a#![cfg_attr()]
attribute.The following will now be an error:
This code will continue working and is not deprecated:
The reasoning for this is explained in #83744: it allows us to not have to cfg-expand in order to determine the crate's type and name.
As of filing the PR, exactly two years have passed since #99784 has been merged, which has turned the lint's default warning level into an error, so there has been ample time to move off the now-forbidden syntax.
cc #91632 - tracking issue for the lint