Skip to content

Allow term.progress.when to default #15287

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

Gordon01
Copy link
Contributor

@Gordon01 Gordon01 commented Mar 9, 2025

What does this PR try to resolve?

The config section term.progress contains a collection of options (currently only when and width). If only width is set, Cargo fails with the error: "missing field when." This behavior may be surprising and inconvenient for users who want to set the CARGO_TERM_PROGRESS_WIDTH environment variable.

How should we test and review this PR?

The relevant test, bad_progress_config_missing_when, has been replaced with default_progress_is_auto.

#14615

From #14615 (comment)

I don't recall any particular decisions made regarding bad_progress_config_missing_when. I personally would not object to changing that to allow it to pass. I can't think of a reason it would be required to specify when with width.

@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-configuration Area: cargo config files and env vars S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 9, 2025
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty reasonable. Thanks!

@weihanglo weihanglo added this pull request to the merge queue Mar 10, 2025
Merged via the queue into rust-lang:master with commit 0dea3cd Mar 10, 2025
21 checks passed
@Gordon01
Copy link
Contributor Author

Amazing!

@Gordon01 Gordon01 deleted the default_for_progress_when branch March 10, 2025 05:08
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2025
Update cargo

15 commits in ab1463d632528e39daf35f263e10c14cbe590ce8..6cf8267012570f63d6b86e85a2ae5627de52df9e
2025-03-08 01:45:05 +0000 to 2025-03-14 15:25:36 +0000
- feat(package): add --exclude-lockfile flag (rust-lang/cargo#15234)
- Redox OS is part of the unix family (rust-lang/cargo#15307)
- docs(ref): Mention `x.y.*` as a kind of version requirement to avoid. (rust-lang/cargo#15310)
- fix(run): Disambiguate bins from different packages that share a name (rust-lang/cargo#15298)
- cargo vendor: Add context which workspace failed to resolve (rust-lang/cargo#15297)
- docs(ref): Note that target-edition is deprecated (rust-lang/cargo#15292)
- refactor(toml): Centralize target descriptions (rust-lang/cargo#15291)
- docs(refs): Add `unsafe` to `extern` while using build scripts in Cargo Book (rust-lang/cargo#15294)
- Replace unmaintained humantime crate with jiff (rust-lang/cargo#15290)
- Add terminal integration via ANSI OSC 9;4 sequences (rust-lang/cargo#14615)
- feat: add completions for add --path (rust-lang/cargo#15288)
- Allow `term.progress.when` to default (rust-lang/cargo#15287)
- docs: spelling and grammar fixes (rust-lang/cargo#15284)
- chore(deps): update cargo-semver-checks to v0.40.0 (rust-lang/cargo#15282)
- Typo fixes (rust-lang/cargo#15280)

r? ghost
@rustbot rustbot added this to the 1.87.0 milestone Mar 15, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-configuration Area: cargo config files and env vars S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants