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

Interoperability with trybuild #32

Closed jhpratt closed 3 years ago

jhpratt commented 3 years ago

Currently, the trybuild crate does not contribute anything to the coverage report. I'm not sure whether this should be fixed in cargo-llvm-cov or trybuild. compiletest_rs, on the other hand, does contribute to the coverage report (but is far more finicky).

taiki-e commented 3 years ago

I'm not sure what we can do about this on our side...

https://github.com/taiki-e/cargo-llvm-cov/blob/a04fcab09be3d5993169a83f480cf6c0c2cfe219/src/main.rs#L142-L170

jhpratt commented 3 years ago

Hmm…that's odd. What does compiletest_rs do differently that it is covered?

jhpratt commented 3 years ago

Just coming back to this. I just looked through trybuild's code and see nothing that could conceivably be changed to help this. It (unfortunately) looks like this has to be handled on llvm-cov's end if my understanding is correct. As far as I can tell the bullet points you've listed are correct as they relate to trybuild.

taiki-e commented 3 years ago

I just found a way to fix this.

taiki-e commented 3 years ago

This will be fixed by #44 and https://github.com/dtolnay/trybuild/pull/121.

jhpratt commented 3 years ago

You're a wizard, what can I say. You always find a way to do things, and generally quite quickly at that.

davidhewitt commented 3 years ago

🚀 thank you, really excited to see this!

taiki-e commented 3 years ago

trybuild 1.0.44 yanked due to regression: https://github.com/dtolnay/trybuild/issues/122

taiki-e commented 3 years ago

FYI: 1.0.34 or older versions of trybuild provide similar behavior to 1.0.44, so you can work around this issue by pinning trybuild to those versions for now.

trybuild = "=1.0.34"