Skip to content
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

trybuild coverage miss #299

Closed
wcampbell0x2a opened this issue Aug 9, 2023 · 4 comments · Fixed by #301
Closed

trybuild coverage miss #299

wcampbell0x2a opened this issue Aug 9, 2023 · 4 comments · Fixed by #301
Labels
C-bug Category: related to a bug.

Comments

@wcampbell0x2a
Copy link

I see that trybuild should generate a coverage hit, but I'm having trouble getting them to hit in this MR.

(The repo (for now) uses tarpaulin, but I might move to this crate)

Expect

I expected the following to have a hit: https://github.com/sharksforarms/deku/pull/352/files#diff-ccee6a304f8d0cb296ba83159aecd8534be0715ac4c0a3d0f1efb57e216ef490L191-L197. This should have been hit from the trybuild test @ tests/test_compile/cases/ctx_validation.stderr

$ TRYBUILD=overwrite cargo +nightly llvm-cov --workspace --doctests --release --html --ignore-filename-regex attributes

image

@taiki-e taiki-e added needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example C-bug Category: related to a bug. and removed needs-mcve Call for participation: This issue needs a Minimal Complete and Verifiable Example labels Aug 12, 2023
@taiki-e
Copy link
Owner

taiki-e commented Aug 12, 2023

Thanks for the report!

This appears to be due to a change in the target directory in trybuild 1.0.76 (dtolnay/trybuild#219).
I can confirm that pinning the trybuild to 1.0.75 or older and running cargo clean and then cargo-llvm-cov solves the problem.

As for the change in trybuild 1.0.76, I thought I had addressed it in #238, but that patch didn't seem to work correctly.

@taiki-e
Copy link
Owner

taiki-e commented Aug 12, 2023

This is because I had missed the fact that the directory where the test workspace was generated had also been updated.

https://github.com/dtolnay/trybuild/pull/219/files#diff-1d06da761111802c793c6e5ca704bfa0d6336d0becf87fddff02d81548a838abL150

This will be fixed in #301.

@taiki-e
Copy link
Owner

taiki-e commented Aug 12, 2023

Fixed in 0.5.26.

@wcampbell0x2a
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants