moonrepo / proto

A pluggable multi-language version manager.
https://moonrepo.dev/proto
MIT License
631 stars 30 forks source link

Noisy output from `proto use --include-global` #588

Closed jakst closed 3 weeks ago

jakst commented 1 month ago

What version?

0.39.7

Which command?

proto use --include-global

What happened?

This is the output from the command when all tools are already up to date. There's a lot going on, despite nothing actually happening.

━━━━       Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
Node.js 22.6.0 has already been installed at ~/.proto/tools/node/22.6.0
━━━━━      Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
pnpm 9.7.0 has already been installed at ~/.proto/tools/pnpm/9.7.0
Deno 1.45.5 has already been installed at ~/.proto/tools/deno/1.45.5
Bun 1.1.22 has already been installed at ~/.proto/tools/bun/1.1.22
━━━━━━     Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
Rust 1.80.1 has already been installed at ~/.rustup/toolchains/1.80.1-aarch64-apple-darwin
━          Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
Go 1.22.6 has already been installed at ~/.proto/tools/go/1.22.6
━━━━━      Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
npm 10.8.2 has already been installed at ~/.proto/tools/npm/10.8.2
━━━━━━━━   Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn                                         
yarn 4.4.0 has already been installed at ~/.proto/tools/yarn/4.4.0
Successfully installed tools!

Some of the issues with this output:

I would've preferred a simple All tools are already up to date or 8 tools are already up to date. This noise is extra annoying when there actually are upgrades, because it gets hard to tell which tools have been upgraded among all the messages.

I hope this feedback is helpful in cleaning up the messaging here! :)

Trace logs?

No response

Operating system?

MacOS

Architecture?

arm64

milesj commented 1 month ago

The progress bar is causing most of these issues, especially the duplicated messages. I'll just remove it for now.

As for the "Successfully installed tools!" message, all tools are installed in separate threads, so the main thread doesn't know what was actually installed or not.

jakst commented 4 weeks ago

Ah ok. I see why upgrades run in separate threads, but could the initial version check run on the main thread so it can report something like upgrading 4 out of 8 tools?

Anyway, as you say fixing the progress bar will be a big improvement on its own, so if that's fixed I'm happy!

milesj commented 3 weeks ago

This will be a lot prettier in the next version.

Screenshot 2024-08-14 at 5 15 16 PM
milesj commented 3 weeks ago

Fixed in 0.40