taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
933 stars 57 forks source link

Support cargo-binstall #168

Closed vmiklos closed 2 years ago

vmiklos commented 2 years ago

Hi,

I'm trying to use cargo llvm-cov during CI, and it would be nice to be able to use cargo bininstall to set up cargo llvm-cov. It seems this would almost work:

$ ./cargo-binstall --no-confirm --version 0.4.1 cargo-llvm-cov
21:39:06 [INFO] Installing package: 'cargo-llvm-cov'
21:39:09 [INFO] Checking for package at: 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.4.1/cargo-llvm-cov-x86_64-unknown-linux-gnu-v0.4.1.tgz'

and then it finds that there is no such artifact & builds from source, which slows down CI.

So it looks for cargo-llvm-cov-x86_64-unknown-linux-gnu-v0.4.1.tgz, while you provide cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz. Would it be possible to rename these, so cargo-bininstall works with cargo-llvm-cov?

Thanks! :-)

taiki-e commented 2 years ago

It is intentional that the version number is not included, and I have no plans to change it. See https://github.com/cross-rs/cross/issues/457 and https://github.com/taiki-e/cargo-hack/pull/91 for the reason.

Instead, I would accept a PR to add metadata to Cargo.toml to support cargo-binstall.

vmiklos commented 2 years ago

I see, thanks for explaining the current state. Will submit a PR in a moment.