Document interaction between custom profiles and overrides#13590
Document interaction between custom profiles and overrides#13590vlovich wants to merge 4 commits intorust-lang:masterfrom
Conversation
Not sure if I actually captured the behavior correctly. Do custom profiles keep package overrides requiring the exact same set to be duplicated if a setting needs to be changed, or are the overrides discarded for a custom profile & the overrides need to be repeated if any settings need to be persisted?
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
@rustbot review |
|
Overrides should be inherited. If you are having problems with the inheritance, I'd recommend opening an issue with a reproduction showing what doesn't seem to be working. |
|
@ehuss fixed the wording to reflect the correct state. |
| NOTE: Custom profiles inherit package overrides as well and those take precedence | ||
| over the default custom profile settings. See the [overrides](#overrides) section for more. |
There was a problem hiding this comment.
What do you think about adding a sentence at line 250, instead of this?
- setting is not specified.
+ setting is not specified. Note that a custom profile inherits everything from
+ the other profile, including package and build [overrides](#overrides).| Overrides cannot specify the `panic`, `lto`, or `rpath` settings. | ||
|
|
||
| Overrides inherit to custom profiles and take precedence unless explicitly overriden. | ||
| For example, in the below example package `foo` will still be built with `opt-level = 1` |
There was a problem hiding this comment.
This doesn't seem to match the current behavior. Check this test as a reference:
cargo/tests/testsuite/profile_custom.rs
Lines 295 to 364 in 61855e7
|
@rustbot author |
|
@vlovich are you still interested in moving this forward? |
|
☔ The latest upstream changes (presumably #14620) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I'm going to close due to inactivity. There were some imprecise understanding in the patch. If you have a chance to help and improve it, feel free to reopen a pull request. |
Not sure if I actually captured the behavior correctly.
What does this PR try to resolve?
Do custom profiles keep package overrides requiring the exact same set to be duplicated if a setting needs to be changed, or are the overrides discarded for a custom profile & the overrides need to be repeated if any settings need to be persisted?
How should we test and review this PR?
N/A - just need to document current behavior.
Additional information
N/A