-
-
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
Line coverage mismatch on trybuild-based proc-macros tests #358
Comments
EDIT: I will not be able to reproduce the problem locally as a complete reproduction is not provided in the first place. |
Ah, nah, maybe another issue is involved because the line coverage is also affected. In any case, I think we need a complete reproduction, including what is tested in trybuild. |
I uploaded https://github.com/PollRobots/min-repo If I run cargo llvm-cov --open I can see that all tests run and succeed, including trybuild tests that verify each error branch in the macro. |
@taiki-e hi, is this something that you will have time to look at? |
@taiki-e --- this has a complete and minimal repo that demonstrates the issue. Is there more that I can provide? |
Thanks for the repro. This seems to be an issue is due to trybuild 1.0.97 regression (dtolnay/trybuild#283). trybuild = "=1.0.96" # work as expected
trybuild = "=1.0.97" # not work as expected |
Hello,
I'm seeing some big discrepancies in code coverage when testing proc macros with trybuild.
Crate structure:
├── src
│ ├── lib.rs
├── tests
│ ├── testcases
│ │ ├── fail
│ │ │ ├── will_fail.rs
│ │ │ ├── will_fail.stderr
│ │ ├── pass
│ │ │ ├── will_pass.rs
│ ├── tests.rs
The content of tests.rs is:
The content of lib.rs is:
This is what workspace coverage is reporting:
But, when the file is clicked, all lines and regions are covered.
This is affecting our CI gates so we'll have to exclude macros from coverage, but would love to get some help on this.
Additional details:
--show-missing-lines
, it reports the same coverage issue, but no lines are reported as uncovered.Thanks in advance!
The text was updated successfully, but these errors were encountered: