Skip to content

refactor(progress): Make the code more approachable#16813

Merged
weihanglo merged 5 commits intorust-lang:masterfrom
epage:progress
Mar 31, 2026
Merged

refactor(progress): Make the code more approachable#16813
weihanglo merged 5 commits intorust-lang:masterfrom
epage:progress

Conversation

@epage
Copy link
Copy Markdown
Contributor

@epage epage commented Mar 31, 2026

What does this PR try to resolve?

This applies the principles from https://epage.github.io/dev/rust-style/ as well as pulls up the use of gctx / Shell.

My hope was to decouple progress from gctx completely so it can go in cargo-util-terminal but there is impl Drop for Progress and I've paused that effort for now. I still feel these cleanups are worth merging on their own. In particular, each shell() call grabs and releases the lock for it and now we only grab it at the highest levels of operations, reducing the chance for race conditions and speeding things up (but will it be noticed?).

How to test and review this PR?

@rustbot rustbot added A-console-output Area: Terminal output, colors, progress bar, etc. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 31, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 31, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

Copy link
Copy Markdown
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 reasonable, though for the re-ordering, do we have any tool/rustfmt options to help with that?

View changes since this review

@weihanglo weihanglo enabled auto-merge March 31, 2026 20:41
@weihanglo weihanglo added this pull request to the merge queue Mar 31, 2026
Merged via the queue into rust-lang:master with commit 9ca882d Mar 31, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 31, 2026
@epage epage deleted the progress branch March 31, 2026 23:11
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 2, 2026
Update cargo submodule

12 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..0c7d80bf5ad3b873a5dbf44e0185152890c6d18a
2026-03-30 16:59:25 +0000 to 2026-04-02 20:48:06 +0000
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)

r? ghost
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 3, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 4, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Apr 4, 2026
Update cargo submodule



15 commits in 888f675344eb1cf2308fd53183e667bdd2c58e51..a357df4c26fc14514e66aae2a269456b5545c7db
2026-03-30 16:59:25 +0000 to 2026-04-03 16:47:15 +0000
- chore: downgrade to libz-sys@1.1.24 (rust-lang/cargo#16833)
- feat: add frame-pointers profile option (rust-lang/cargo#16742)
- upgrade to gix@0.81.0 (rust-lang/cargo#16828)
- refactor(network): use async for registry network operations (rust-lang/cargo#16745)
- fix(compile): Don't hide hard warnings with build.warnings=allow (rust-lang/cargo#16827)
- chore: Upgrade incompatible dependencies (rust-lang/cargo#16825)
- fix(compile): build.warnings=allow should not hide denied diagnostics (rust-lang/cargo#16824)
- fix(install): Ignore resolver.lockfile-path (rust-lang/cargo#16823)
- chore(deps): update compatible (rust-lang/cargo#16820)
- refactor(compile): Consolidate output options (rust-lang/cargo#16821)
- refactor: Export public dependencies from internal crates (rust-lang/cargo#16819)
- refactor(progress): Make the code more approachable (rust-lang/cargo#16813)
- Simplified build script bin names in new layout (rust-lang/cargo#16812)
- fix: set CARGO env var during rustc -vV probe (rust-lang/cargo#16811)
- Split out `cargo-util-terminal` (rust-lang/cargo#16809)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-console-output Area: Terminal output, colors, progress bar, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants