Closed reinvantveer closed 10 months ago
Aha so cargo add --dev cargo-tarpaulin
would just add tarpaulin as a library it won't add the dependency, you need to do cargo install tarpaulin
for that.
As to why tarpaulin has a library interface - it was initially so I could embed parts of it into other sandbox programs to test/experiment on things, but it does have at least one user who has it as part of a service and didn't want to exec another process
@xd009642 thanks for your quick reply. So there's no "easy" way around this, I gather? I'd probably have to do something like
cargo install cargo-tarpaulin --version=$(grep cargo-tarpaulin Cargo.toml | cut -d '"' -f 2)
Is this correct?
Do you actually need tarpaulin as a library? If not I'd just do cargo install cargo-tarpaulin --version=$VERSION
and avoid the grep stuff. But yeah that's correct
Thank you!!!
Hello lovely tarpaulin maintainers, I've just started using Rust for production purposes, which makes me run into things I haven't used before. tarpaulin does exactly what I would like from it (except maybe for covering macro expanded stuff, but I can see that this is hard). I ran into creating a Dockerfile that uses tarpauling for enforcing test coverage.
I'm not sure if there's an easy fix for this issue, or even whether this is the right place for it.
Describe the bug
cargo build --release
does not appear to install thecargo tarpaulin
extension. This isn't quite what I expected. I need to runcargo install cargo-tarpaulin
even though I have listed cargo-tarpaulin under[dev-dependencies]
in Cargo.toml. Butcargo install cargo-tarpaulin
isn't quite reproducible unless I specify which versionTo Reproduce
output:
Expected behavior cargo running tarpaulin: it's specified in the dev-dependencies