cargo-bins / cargo-binstall

Binary installation for rust projects
GNU General Public License v3.0
1.6k stars 58 forks source link

Possible UI / UX improvements? #156

Open ryankurte opened 2 years ago

ryankurte commented 2 years ago

playing with this on arm64 and i think we could re-evaluate the UI a little bit, maybe improve the balance between debug / info and streamline what the user actually -sees-

at the moment this looks something like:

> pi@pi-sx128x-01:~ $ cargo binstall radio-sx128x
22:13:19 [INFO] Installing package: 'radio-sx128x'
22:13:22 [INFO] Checking for package at: 'https://github.com/rust-iot/rust-radio-sx128x/releases/download/v0.18.0/sx128x-util-aarch64-unknown-linux-gnu.tgz'
22:13:22 [INFO] Sending installation report to quickinstall (anonymous)
22:13:24 [INFO] Checking for package at: 'https://github.com/alsuren/cargo-quickinstall/releases/download/radio-sx128x-0.18.0-aarch64-unknown-linux-gnu/radio-sx128x-0.18.0-aarch64-unknown-linux-gnu.tar.gz'
22:13:24 [WARN] The package will be installed from source (with cargo)
22:13:24 [INFO] Do you wish to continue? yes/[no]
? no
22:13:25 [WARN] Installation cancelled

i think most of this is a relic of debugging when i started writing this, also i am not sure but it -seems- like we're reporting to quickinstall even when not finding a matching package?

so i guess the real question is how would we -like- this to look? i'm imagining something more modern-package-manager?

> pi@pi-sx128x-01:~ $ cargo binstall radio-sx128x
**Installing package: 'radio-sx128x' (version: [VERSION])**
Checking for github release...               [tick]
Checking for quickinstall package...     [tick]
  Downloading via quickinstall...           [spinner]
[...]
passcod commented 2 years ago

it -seems- like we're reporting to quickinstall even when not finding a matching package?

That's the intent, actually. The reporting to quickinstall is a signal to qi that they should consider the package for building.

passcod commented 2 years ago

Also, yes, I was thinking about UI for last release but couldn't see an easy win besides the (slight) confirm improvements. Failure of imagination! I like your draft here

passcod commented 2 years ago

Taking this, I'll be making UI improvements on top of #171 when that merges

NobodyXu commented 2 years ago

@passcod Have you started implementing it? If not, I can submit a PR for moving all stdout io into the ui-thread and remove the timestamp information (22:13:24 [INFO]) from the output.

passcod commented 2 years ago

As per https://github.com/cargo-bins/cargo-binstall/pull/382#issuecomment-1250031729 we probably want to also ditch the confirm step, as most of the work is done before it anyway.