-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo metadata includes unused crates #10384
Comments
Hm, I'm not quite seeing the issue with tracing. Can you say which version you have, or more detail on how to reproduce?
I also don't see |
Hi! Thanks for taking a look! :) Sorry, my bad, seems it is |
Ah, I see. The issue is that This can be avoided by using the |
I will have a look at the possibility of having tarpaulin potentially use the filter-platform flag. Thank you for the insight :) |
Looking over this, I'm not seeing any remaining action items (or opportunities to avoid this confusion in the future), so I'm going to close this. If there is a reason we should re-open it, let us know! |
Problem
Hello!
I am working on arlyon/async-stripe which uses tarpaulin for coverage tracking. I recently introduced the
tracing
crate to clean up the logging story, whose MSRV is1.49.0
(same at the library). However, the MSRV of a transitive dependency,valuable
, is1.51.0
because it uses the new resolver. Now,valuable
is not actually included in the build (as evidenced bycargo tree -i valuable
) because it is disabled by default, butcargo metadata
fails:My question / bug report is:
It feels strange having to bump my MSRV because of an unused optional transitive dependency breaking CI.
Steps
cargo +1.49.0 new metadata-repro
tracing-subscriber
to your project:cargo +1.49.0 add tracing-subscriber
cargo metadata
:cargo +1.49.0 metadata
Possible Solution(s)
Assuming omitting the data for unused features is a breaking change, consider providing a flag such that only the dependencies actually used by your program are emitted.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: