Skip to content

Conversation

@theduke
Copy link
Contributor

@theduke theduke commented Oct 24, 2025

Cleans up the CLI run command code a bit by splitting up code into submodules,
improving code flow for the progress bar, and replacing the is-terminal crate
with standard library functionality.

Best reviewed commit by commit.

  • chore(cli): commands/run code quality cleanup
  • chore(cli): MonitoringRuntime progress bar cleanup
  • chore(deps): Replace is-terminal crate with stdlib

Dropped:
chore(cli): Only show compilation progress bar after a delay

Because it doesn't work correctly.

The mod.rs is long and contains a lot of things.

This commit:
* splits funcitonality out into submodules (targetrs, runtime.rs,
  package_source.rs)
* Renames the shadowing PackageSource to CliPackageSource to avoid the
  renamed import and name confusion
* Fixes some other small code quality issues (eg Self vs <name> in impls)
@theduke theduke requested a review from syrusakbary as a code owner October 24, 2025 04:38
@theduke theduke requested review from Arshia001 and marxin October 24, 2025 04:38
@theduke theduke force-pushed the cli-progressbar-fix branch from e4b0a16 to 64079c3 Compare October 24, 2025 04:41
* Use a single progress bar
* Show bar again if it was hidden
* Remove code duplication for quiet flag handling
The functionality from the is-terminal crate was lifted into the
standard library.

Since we recently bumped the Rust MSRV, we can now rely on it and remove
a dependency.
@theduke theduke force-pushed the cli-progressbar-fix branch from 64079c3 to 9535733 Compare October 24, 2025 04:55
@marxin
Copy link
Contributor

marxin commented Oct 24, 2025

The progress bar is really neat, I like it! For the future, we might want to integrate detailed bar update for Downloading and Compiling phases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants