-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove unstable cfg target(...)
compact feature
#130780
base: master
Are you sure you want to change the base?
Conversation
Wasn’t this helping to remove some use cases for build scripts? |
The part that was supposed to help with build script was the |
IIRC the target abi was only matchable in build scripts, is that still the case today (with and without this PR)? To be able to lower the need for build scripts in the ecosystem we need cfgs to be at least isomorphic… |
This PR doesn't change anything for matching on specific target cfgs components. This PR only removes the shorthand As for the target abi, the |
Good. Thank you for the clarifications. |
This comment was marked as resolved.
This comment was marked as resolved.
79578af
to
9832308
Compare
This comment was marked as resolved.
This comment was marked as resolved.
9832308
to
1de1d84
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1de1d84
to
1f2c377
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1f2c377
to
7c50b97
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7c50b97
to
2cdde6a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
2cdde6a
to
c6b25b3
Compare
This comment was marked as resolved.
This comment was marked as resolved.
c6b25b3
to
f047624
Compare
This comment has been minimized.
This comment has been minimized.
f047624
to
4475a8e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
4475a8e
to
dd3f8ff
Compare
Some changes occurred in compiler/rustc_attr_parsing |
So, strictly speaking, removing something unstable from the compiler doesn't need our lang OK. If compiler wants to say, "we're not happy with the implementation, we're going to pull it out until someone tries again", or "this is in the way, and it's not on track to be stabilized soon, so we're going to pull it out", then that can just be done, though we appreciate a heads-up and CC on it, especially if it's in the critical path of something on our radar. On this one though, I do read it as a lang request. (This is what I think you had in mind also; I'm saying this all for the benefit of others.) The implementation seems fine, and it's not a lot of code, and it doesn't seem in the way of anything. So it's basically just a prompt to ask the lang question of whether this is something we still want or not. In that light, this is nominated, and we'll try to get to it (no promises on timing), but also, let's ping everyone and maybe we'll collect some thoughts. @rust-lang/lang: What do we think? Do we still want |
I mildly appreciated the idea of the target shorthand syntax. I think it's not useful to count occurrences in code search, because (like most convenience features) nobody is going to use nightly just for a convenience feature; people will wait for it to be in stable before using it. That said, it's a small feature that provides a small amount of value; it's not going to be earth-shattering, whether it stays or goes. If anyone feels like it doesn't carry enough weight, or if it adds any non-trivial complexity to |
Pulling it out drops only 28 lines of entirely plain and boring code. It all seems to come down, I think, to whether or not this is something we want to let people write. Agreed that use in nightly is a poor metric, especially here. I'd never use this until we had stabilized it. |
This PR removes the unstable
cfg_target_compact
feature from #96901, which permits compacttarget(...)
cfgs (e.g.cfg(target(os = "linux"))
->cfg(target_os = "linux")
).The feature:
target_*
cfgsas it will only save you the "target_" part on the second cfg
target(os = "linux", env = "")
meanstarget_os = "linux", target_env = ""
in every other placeAll this to say that I don't think the feature pulls its weight.
@rustbot label +I-lang-nominated
Closes #96901