Closed ericseppanen closed 2 years ago
cargo check
has the same behavior. Perhaps this is a dupe of cargo bug #8546?
It is behaviour from cargo
yeah, it's which crates RUSTC_WORKSPACE_WRAPPER
apply to.
For vendoring dependencies usually [source]
is used (as output by cargo vendor
), but on the clippy side if you do want to ignore path dependencies/workspace members --no-deps
should work
... on the clippy side if you do want to ignore path dependencies/workspace members --no-deps should work
That doesn't work in this case because the warnings are actually compiler warnings, not clippy lints. Feel free to try the "reproducer" example above to demonstrate this.
Closing in favor of cargo bug #8546.
Summary
I have noticed that one of my dependencies has compiler warnings. This doesn't usually affect how I use Clippy, because those warnings are suppressed.
However, when I tried to vendor that dependency (checking it in to git in a path outside my project [^1], and changing Cargo.toml to use
some_crate = { path = "../vendored/that_crate" }
), I find that now Clippy is reporting the compiler warnings from inside that dependency.I have searched for similar reports of this problem, but didn't see any. #3025 seems possibly related, but doesn't address this issue directly.
[^1]: I've tried this with and without a cargo workspace, and get the same result.
[^2]: To get the vendored copy:
git clone -b v0.0.14 https://github.com/nbigaouette/onnxruntime-rs.git
Reproducer
I started a new project, and specified the same dependency in 3 different ways.[^2] Only with the third one (vendored to a local path) does clippy report that crates' warnings when running
cargo clippy
from within my project.Version
Additional Labels
No response