-
Notifications
You must be signed in to change notification settings - Fork 13k
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
update rustc_index_macros
feature handling
#134526
Conversation
It seems that cargo can't conditionally propagate features when `default-features` is set to `false`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
That is... weird. I'll take a look tmrw. |
What do you mean by this? |
This does not work. |
It does seem to work sometimes though? Only particular |
I couldn't see anything that could be related in bootstrap. |
Note that if this truly does not work you'll have to also change it here rust/compiler/rustc_abi/Cargo.toml Lines 13 to 32 in eca1702
and in the dozen other places where we do the same thing. I think the first step would be to reproduce this in a minimal example and file a cargo issue, if this is really the problem. |
Yeah, I saw those too. This PR was kind of a hotfix for the problem you experienced to improve the developer experience. I think it's worth filing an issue on the cargo side, will do that today. |
Hm yeah this PR does fix that problem... I have no idea why, given that the same pattern is still used in a whole bunch of other places. |
I think we probably should wait until we hear back from T-cargo before merging this (even as a hotfix)... I don't quite understand this current behavior either. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Ok, I did some more testing. This PR's changes notably still passes |
I tried to create a simple reproduction in a new cargo workspace but I couldn't reproduce it. I am not sure what is the special case in compiler tree, but I don't want to spend more time on this since there are alternative |
Yeah, I also tried to make a smaller repro but failed. @bors r+ rollup=iffy |
…ieyouxu update `rustc_index_macros` feature handling It seems that cargo can't [conditionally propagate features](https://github.com/rust-lang/rust/blob/214587c89d527dd0ccbe1f2150c737d3bdee67b0/compiler/rustc_index/Cargo.toml#L20) if they were enabled by default on the target crate, but disabled with `default-features = false` in the current/parent crate. Fixes rust-lang#118129
…ieyouxu update `rustc_index_macros` feature handling It seems that cargo can't [conditionally propagate features](https://github.com/rust-lang/rust/blob/214587c89d527dd0ccbe1f2150c737d3bdee67b0/compiler/rustc_index/Cargo.toml#L20) if they were enabled by default on the target crate, but disabled with `default-features = false` in the current/parent crate. Fixes rust-lang#118129
Rollup of 6 pull requests Successful merges: - rust-lang#131072 (Win: Use POSIX rename semantics for `std::fs::rename` if available) - rust-lang#134325 (Correctly document CTFE behavior of is_null and methods that call is_null.) - rust-lang#134526 (update `rustc_index_macros` feature handling) - rust-lang#134581 (Bump Fuchsia toolchain for testing) - rust-lang#134607 (on pair → on par) - rust-lang#134608 (Move test rust-lang#93775 to crashes) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#131072 (Win: Use POSIX rename semantics for `std::fs::rename` if available) - rust-lang#134325 (Correctly document CTFE behavior of is_null and methods that call is_null.) - rust-lang#134526 (update `rustc_index_macros` feature handling) - rust-lang#134581 (Bump Fuchsia toolchain for testing) - rust-lang#134607 (on pair → on par) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134526 - onur-ozkan:nightly-feat-rustc, r=jieyouxu update `rustc_index_macros` feature handling It seems that cargo can't [conditionally propagate features](https://github.com/rust-lang/rust/blob/214587c89d527dd0ccbe1f2150c737d3bdee67b0/compiler/rustc_index/Cargo.toml#L20) if they were enabled by default on the target crate, but disabled with `default-features = false` in the current/parent crate. Fixes rust-lang#118129
It seems that cargo can't conditionally propagate features if they were enabled by default on the target crate, but disabled with
default-features = false
in the current/parent crate.Fixes #118129