-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Tracking Issue for -Z patch-in-config
#9269
Comments
Documentation for feature in #9270 |
I'm trying to figure out the best way for me to test this feature, since I don't want to change cargo/rustc we use internally to be nightly, as it might cause developers to start adopting experimental features. I wonder, is there a way to use a cargo Alternatively, is there an "inverse" of |
Document `-Zpatch-in-config` Tracking issue: #9269
Add CLI help text for patch-in-config Tracking issue: #9269
I believe there's an |
I've suggested adding |
I would love to have a mechanism to prevent the use of nightly features, regardless of compiler branch. That'd be helpful, for instance, if using nightly for toolchain reasons (needing specific options or optimizations or targets), but not wanting to make code depend on nightly. |
Ah, so, I specifically want to disallow all unstable features except one, since I want the ability to test a particular feature without opening the floodgates to all the others. |
I started an internals discussion over in https://internals.rust-lang.org/t/mechanism-for-beta-testing-unstable-features/14280 for those interested in that line of discussion :) |
I can report that I've been using this to great success in a fairly large internal developer ecosystem for a while now. What kind of evidence report would be helpful to the Cargo team to aid in making an eventual stabilization decision? |
We discussed this in today's @rust-lang/cargo meeting. We felt like, for this feature, the signal that you've used this extensively in a large internal developer ecosystem is enough of a proof point. We did have one concern that we felt needs addressing before this stabilizes: it sounds like a Other than that, we think this can be stabilized, and we'd welcome a stabilization PR. Separately, and not as a blocker from this: it would be nice if |
Exciting! Done in #9839. That would be a really good change, though given that I don't actually use |
Sorry, I don't think I expressed my concern about publishing clearly. There are a few concerns here:
|
Ah, I see what you mean (for 1). That one's trickier to address. Is your thinking that we should re-write any configuration files that end up in a |
EDIT: After writing the following, I realize it may not be an issue, see below... Hm, I don't really know the answer on how to address it. First, I would verify that my assumption is correct that The rewriting of Offhand I can think of two solutions:
Regardless, can you write a test just to see how |
It looks like there is already a test to that effect: cargo/tests/testsuite/install.rs Line 1531 in 77a0379
Would you like one that specifically checks a config with |
Yea, that's probably sufficient. Thanks for checking! |
Stabilize patch-in-config (and prefer config over manifest) Tracking issue: #9269 --- This stabilizes the `patch-in-config` feature ([unstable entry](https://doc.rust-lang.org/cargo/reference/unstable.html#patch-in-config)) following the discussion in #9269 (comment). As requested, this PR _also_ changes the precedence behavior such that a `[patch]` for the same dependency in both `.cargo/config.toml` and `Cargo.toml` prefers the patch from the configuration file over the one from the manifest, which matches the behavior of other overlapping configuration options. The corresponding test has also been updated to reflect this change in behavior.
I believe this can now be closed since the feature has landed? |
Indeed, thanks @jonhoo! |
Summary
Original issue: #5539
Implementation: #9204
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#patch-in-config
The
-Z patch-in-config
flag enables the use of[patch]
sections in cargo configuration files (.cargo/config.toml
).Unresolved issues
None known.
Future extensions
None known.
The text was updated successfully, but these errors were encountered: