-
-
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
Fix generic code hit by doctests not correctly remapped #122
Conversation
IIRC, this was needed because sometimes macros are displayed with absolute paths in HTML reports. Lines 205 to 206 in 30efe47
I guess the underlying bug has not been fixed yet, but currently, the ignore_filename_regex excludes a few more directories, so I don't think those will be displayed in the report anyway. (That said, this flag may have been necessary to include those macros in the report.) |
Are you suggesting the flag might not be necessary after all? |
Yes |
uff… I tried to do that, but now all the snapshot tests have randomized paths in them. I give up 😓 |
(I'm starting to think to provide an option to disable --remap-path-prefix: #140 (comment)) |
Closing as rust-lang/rust#92648 has been closed. Also, --remap-path-prefix is optional since cargo-llvm-cov 0.3 (#141), so the problem may no longer be reproducible without the --remap-path-prefix option. Thanks anyway for the PR! |
cargo-llvm-cov
currently uses--remap-path-prefix
internally (not sure for the reason why?).However that option is not recognized by rustdoc at the moment, which means that generic code that is instantiated in doctests is not counted towards the coverage, as it ends up in a "different" file as far as llvm tools are concerned.
I think in order to fix this, the flag needs to be supported in rustdoc as well, and I am exploring that option right now, so stay tuned.
relates to #2
I opened rust-lang/rust#92648 for the necessary changes in rustdoc, with which I generated the test snapshots in this PR, however I would like to somehow increase the confidence here a bit. Also I have seen that there is some code that does feature detection, and it might be a good idea to do that for this flag as well (and gate the test on the flag being available). Can you maybe point me in the right direction how to best do that?