taiki-e / cargo-llvm-cov

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

Get target and profile from nextest archive #349

Closed taiki-e closed 4 months ago

taiki-e commented 4 months ago

Better solution for #334 and #348. (FYI @cwfitzgerald @weiznich)

Open the zstd file, parse the nextest metadata, and if that does not work (I assume it is a format that not stable between breaking releases), follow what is passed in the arguments.

This eliminates the need in most cases to pass the flags passed to cargo llvm-cov nextest-archive to cargo llvm-cov nextest --archive-file again.

Before:

https://github.com/taiki-e/cargo-llvm-cov/blob/959921c2f9da5c01f6be595321998633c4bcf9d9/.github/workflows/ci.yml#L90-L91

https://github.com/taiki-e/cargo-llvm-cov/blob/959921c2f9da5c01f6be595321998633c4bcf9d9/.github/workflows/ci.yml#L99-L100

After:

https://github.com/taiki-e/cargo-llvm-cov/blob/3bc61cbd28d787a5bbfa3761d36c76cb7c061db9/.github/workflows/ci.yml#L90-L91

https://github.com/taiki-e/cargo-llvm-cov/blob/3bc61cbd28d787a5bbfa3761d36c76cb7c061db9/.github/workflows/ci.yml#L99-L100

taiki-e commented 4 months ago

Published in 0.6.6.

weiznich commented 4 months ago

Thanks for the fast fix :heart: That's really appreciated