cargo-bins / cargo-binstall

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

Strange string when using cargo-binstall to install #1943

Closed pepa65 closed 2 weeks ago

pepa65 commented 3 weeks ago

When using cargo-binstall qft this is the output:

 INFO resolve: Resolving package: 'qft'
 WARN The package qft v0.7.4 (x86_64-unknown-linux-gnu) has been downloaded from github.com
 INFO This will install the following binaries:
 INFO   - qft (bin-qft-x86_64-unknown-linux-gnu-GhCrateMeta -> /root/.cargo/bin/qft)
Do you wish to continue? yes/[no]

Some remarks:

  1. The package is actually x86_64-unknown-linux-musl, should I have declared that somewhere in package.metadata.binstall?
  2. The part -GhCrateMeta looks strange, like it's mangled, how can I prevent that from getting displayed like that?
  3. The question whether the user wished to continue suggests that yes is the default, but when you just respond with Enter, it does not continue, you have to type "yes". Perhaps display it like [yes/NO] to clearly indicate the default?
NobodyXu commented 3 weeks ago

Thanks for reporting!

The package is actually x86_64-unknown-linux-musl, should I have declared that somewhere in package.metadata.binstall?

no that is the target, not the package name.

The part -GhCrateMeta looks strange, like it's mangled, how can I prevent that from getting displayed like that?

that's our the resolution method used, I agree that we can do better and this is not very readable.

Perhaps display it like [yes/NO] to clearly indicate the default?

yeah that's a good idea, I will accept PR, or I can do it myself after I finished the current PR.

pepa65 commented 3 weeks ago

Made a PR #1947

pepa65 commented 3 weeks ago

New PR #1948