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

Exclude instantiations from statistics? #397

Closed
jaskij opened this issue Nov 25, 2024 · 2 comments · Fixed by tokio-rs/valuable#136
Closed

Exclude instantiations from statistics? #397

jaskij opened this issue Nov 25, 2024 · 2 comments · Fixed by tokio-rs/valuable#136
Labels
C-question Category: A question C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)

Comments

@jaskij
Copy link
Contributor

jaskij commented Nov 25, 2024

A few of the structs in my code #[derive(valuable::Valuable)] from valuable. Those derives show up on the report as not-covered, which is fine, but I would like to exclude them from the statistics. Or the whole report, either way is fine.

Is this something that is achievable and I'm just missing it, or is not currently supported?

@taiki-e
Copy link
Owner

taiki-e commented Dec 4, 2024

With the current Rust coverage mechanism, this needs to be handled on the derive macro side.

Perhaps we need to stabilize the #[coverage(off)] attribute first.

See also rust-lang/rust#84605 (comment) and subsequent 3 comments.

@taiki-e taiki-e closed this as completed Dec 4, 2024
@taiki-e taiki-e added C-question Category: A question C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream) labels Dec 4, 2024
@taiki-e
Copy link
Owner

taiki-e commented Dec 21, 2024

Considering rust-lang/rust#120185, I think using #[automatically_derived] in valueable-derive resolves this issue.

Filed tokio-rs/valuable#136 to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: A question C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants