You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
[dependencies]
# No warnings from clippy if I do this
#onnxruntime = "0.0.14"
# No warnings from clippy if I do this
#onnxruntime = { git = "https://github.com/nbigaouette/onnxruntime-rs.git", tag = "v0.0.14" }
# Clippy prints warnings if I do this
onnxruntime = { path = "../vendored/onnxruntime-rs/onnxruntime" }
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.
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.
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
Footnotes
I've tried this with and without a cargo workspace, and get the same result. ↩
To get the vendored copy:
git clone -b v0.0.14 https://github.com/nbigaouette/onnxruntime-rs.git
↩The text was updated successfully, but these errors were encountered: