tarpaulin: Cannot run cargo-tarpulin in a pyo3 project
Not sure if this is a feature request or a bug - but am entering it into the bug system. Happy to provide more information / help anyway I can.
Bug Description
cargo-tarpaulin
will fail with linking errors if run on a pyo3 project.
Attached the full error here tarpaulin_error.txt
Reproducing
This can be reproduced by just creating a new pyo3 project with maturin
maturin new example_pyo3
cd example_pyo3
cargo-tarpaulin
Expected Behavior
I was expecting this to work like purely rust projects.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (7 by maintainers)
Commits related to this issue
- Fixed code coverage based on this issue: https://github.com/xd009642/tarpaulin/issues/1092 — committed to SteampunkIslande/vcf2parquet by SteampunkIslande 5 months ago
- Fixes #1092 Adds a `--no-dead-code` flag which stops tarpaulin adding `-Clink-dead-code` fixing linking issues with code interacting via certain C libraries. — committed to amadeusine/tarpaulin by xd009642 a year ago
And it all passes and works in examples I’ve checked so I’m going to go ahead and merge 🎉
It looks like the LLVM version in the rust docker images doesn’t have the llvm profiling runtime (I’ll need to look into this I’ll make another issue for it later). I’d recommend instead installing tarpaulin via something like https://github.com/cargo-bins/cargo-binstall if you want to cut down on CI runtime instead in the meantime
Actually, you know what, I ll try to get it running on CI (It’s alright if I am unable to run it locally 😃 ) After seeing that you are able to run it, it gives me more hope to get it runnning on CI