-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Src file mapping not working properly with trybuild
and proc-macro workspace member
#140
Comments
Thanks for the report! This appears to be a bug in rustc's --remap-path-prefix. If I disable it, it works correctly (#141). |
I tested the PR and it seems to solve the issue. Do you have any concerns with the change in the PR? |
The problem I am currently aware of is that our test suite does not work well because the reports show absolute paths.
Another concern is that this may be a problem when merging coverage between different platforms. (I have not looked into this yet.) So, for now, I'm starting to think it is reasonable to provide an option to disable --remap-path-prefix. |
According to ruifengx/rowantlr#3, this seems to be a regression introduced around 2021-11-30. |
Maybe something to do with rust-lang/rust#83846 (merged on 2021-11-11)? |
Published 0.3.0 which includes the fix for this. |
When running integration tests (via
trybuild
) for a proc-macro crate that is a workspace member, the following warning is output:cmd run:
cargo llvm-cov --workspace --html
The report ends up showing 2 entries for the same src file as seen below
You can find a small reproducible sample here: test.tar.gz
This seems to be happening even if
trybuild::TestCases::new()
is the only thing in the test fn (no calls topass
orcompile_fail
).It also seems to work fine if the crate is a normal lib instead of a proc-macro lib.
I wasn't sure if this is an issue with
cargo-llvm-cov
ortrybuild
but having triedtarpaulin
with success (same setup), I thought it might be an issue withcargo-llvm-cov
.The text was updated successfully, but these errors were encountered: