-
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
Named profile updates #9685
Named profile updates #9685
Conversation
dir-name primarily exists for translating the built-in profiles. In order to simplify the UI, we would like to not expose it to the user for the initial stabilization. The code to support it is kept in case we want to add it in the future.
Just to give a little flexibility in the future in case we want to use these, or that they could cause confusion. Also updated the error text a little.
This makes the following changes: - Allows `cargo check`, `cargo fix`, and `cargo rustc` to support custom named profiles. This retains the legacy behavior of those commands. - Fixes `cargo bench` so that it supports custom named profiles.
(rust-highfive has picked a reviewer for you, use r? to override) |
During our previous meeting, we discussed the inconsistency of the legacy commands compared to other commands. Specifically,
So the only command that is really questionable is I'm not completely set on this decision, but changing the behavior will require much deeper changes (essentially adding a I acknowledge that this is a bit of a wart in regards to retaining backwards compatibility, but I hope that it won't be too confusing, and can be addressed in the documentation to mention this special behavior. |
@rfcbot fcp merge These changes all look good to me! I think the various warts/etc here are minor enough personally (and I can't think of better alternatives) |
Team member @alexcrichton 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! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
As discussed in the @rust-lang/cargo meeting: It sounds like The That just leaves |
Yea, the behavior of I'm going to go ahead and approve, and think about some of these edge cases more. @bors r=alexcrichton |
📌 Commit 73dba76 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 6 commits in 27277d966b3cfa454d6dea7f724cb961c036251c..4e143fd131e0c16cefd008456e974236ca54e62e 2021-07-16 00:50:39 +0000 to 2021-07-20 21:55:45 +0000 - Named profile updates (rust-lang/cargo#9685) - Inform build scripts of rustc compiler context (rust-lang/cargo#9601) - Factor version preferences into a struct (rust-lang/cargo#9703) - docs: Fix sentence & update link for GitLab CI docs (rust-lang/cargo#9704) - Deduplicate compiler diagnostics. (rust-lang/cargo#9675) - Re-enable future-incompatible tests. (rust-lang/cargo#9698)
Update cargo 6 commits in 27277d966b3cfa454d6dea7f724cb961c036251c..4e143fd131e0c16cefd008456e974236ca54e62e 2021-07-16 00:50:39 +0000 to 2021-07-20 21:55:45 +0000 - Named profile updates (rust-lang/cargo#9685) - Inform build scripts of rustc compiler context (rust-lang/cargo#9601) - Factor version preferences into a struct (rust-lang/cargo#9703) - docs: Fix sentence & update link for GitLab CI docs (rust-lang/cargo#9704) - Deduplicate compiler diagnostics. (rust-lang/cargo#9675) - Re-enable future-incompatible tests. (rust-lang/cargo#9698)
Fix rustc --profile=dev unstable check. This fixes an oversight from #9685 where `cargo rustc --profile=dev` was accidentally changed to require `-Zunstable-options`. 1.54 and earlier supported that [here](https://github.com/rust-lang/cargo/blob/rust-1.54.0/src/bin/cargo/commands/rustc.rs#L490. Fixes #9897
Allowing the `dir-name` key for profiles was removed in rust-lang#9685.
A few updates for named profiles to push them closer to stabilization:
dir-name
profile setting.dir-name
primarily exists for translating the built-in profiles or sharing artifacts between profiles. In order to simplify the UI, we would like to not expose it to the user for the initial stabilization. The code to support it is kept in case we want to add it in the future.cargo check
--profile=test
: This forces the test mode. For example,cargo check --lib --profile=test
will check the library as a unit test (with--test
).cargo fix
--profile=test
: Forces test mode, same as above.cargo rustc
--profile=test
: Forces test mode, same as above.--profile=bench
: Forces bench mode.--profile=check
: Forces check mode.--release
, which is normally not allowed.cargo bench
to support the--profile
option. I think it was just forgotten.