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
let target_data = RustcTargetData::new(ws,&requested_kinds)?;
Which calls RustcTargetData::new.
This value doesn't appear to actually be used by any of the following code-paths, it's only used if some conditionals are hit which aren't triggered in the cargo metadata path (or at least, aren't without additional flags).
It would be useful to not need a rustc binary present in order to run cargo metadata.
Possible Solution(s)
I can imagine either making the rustc -vV invocation lazy, or a refactoring to not need to pass that arg around (or accept an Option)?
The text was updated successfully, but these errors were encountered:
Problem
I tried to run
cargo metadata
with only acargo
binary on my$PATH
, and norustc
.I got an error that
rustc
could not be found.Steps
rustc
from your$PATH
cargo metadata
in some directory containing aCargo.toml
fileNotes
It appears to be because of this line of code:
cargo/src/cargo/ops/cargo_output_metadata.rs
Line 113 in 58a9613
Which calls
RustcTargetData::new
.This value doesn't appear to actually be used by any of the following code-paths, it's only used if some conditionals are hit which aren't triggered in the
cargo metadata
path (or at least, aren't without additional flags).It would be useful to not need a
rustc
binary present in order to runcargo metadata
.Possible Solution(s)
I can imagine either making the
rustc -vV
invocation lazy, or a refactoring to not need to pass that arg around (or accept anOption
)?The text was updated successfully, but these errors were encountered: