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
The error below is similar to a few issues, but none seem to have the same cause (as far as I'm aware), which is why I created a new issue instead of commenting on an earlier issue. Apologies if I misread those issues.
I tried to run cargo clippy with the following arguments:
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `C:\Users\user\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\clippy-driver.exe rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --cr
ate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: multiple input filenames provided (first two filenames are `-` and `C:\dev\rust-releases\:all`)
I'm unsure how this change in behaviour came to be, but it seems like the crate name passed to clippy-driver is a bunch (three to be exact) of underscores. I am also unsure how to work around this issue.
Invoking clippy-driver with crate name substituted (hangs)
Invoking the failing command directly, but with the crate name replaced by my top-level crate seems to hang the clippy-driver process (looking at process explorer there's no ongoing computation), so it's probably not the correct way to call this:
Compared to other issues which report a similar error message:
#2765: I checked, I've not customized the .cargo/config file; it doesn't exist. #2602: Maybe a duplicate of this one? I also get the error immediately on invoking cargo-clippy, but not entirely sure. #2001: I don't run it on a single file as far as I am aware #2566: Running directly with ~/.cargo/bin/cargo-clippy produces the same error, unlike in this issue; the underlying cause of this issue which skipped one too many arguments doesn't seem to exist anymore in the latest master (but I'm not familiar with the code base) #2484: I don't override rustc, where.exe rustc produces C:\Users\al\.cargo\bin\rustc.exe and looking at my env vars, RUSTC doesn't seem to exist.
Inconsistent between projects
Various other projects seem to work correctly, but for this one, re-cloning or cargo clean and running clippy again doesn't. If there's something else I can do to help, please let me know!
Edit: the cause of the error is probably a bit fragile; testing a bit more on the same repo gives inconsitent results; sometimes it does work after cargo clean && cargo clippy --all --tests --all-features -- -Dwarnings, which doesn't help for easy reproduction :(.
The text was updated successfully, but these errors were encountered:
foresterre
changed the title
error: multiple input filenames provided with empty crate name in clippy-driver invocation
error: multiple input filenames provided with missing crate name in clippy-driver invocation
Jul 1, 2021
The error below is similar to a few issues, but none seem to have the same cause (as far as I'm aware), which is why I created a new issue instead of commenting on an earlier issue. Apologies if I misread those issues.
I tried to run cargo clippy with the following arguments:
The first time I invoked this command it produced the following output (as expected!):
Output
Then I ran:
This command gave me the following unexpected error:
To test whether the syntax of the command was incorrect I ran the first command again:
which now also outputs:
I'm unsure how this change in behaviour came to be, but it seems like the crate name passed to
clippy-driver
is a bunch (three to be exact) of underscores. I am also unsure how to work around this issue.Invoking clippy-driver with crate name substituted (hangs)
Invoking the failing command directly, but with the crate name replaced by my top-level crate seems to hang the clippy-driver process (looking at process explorer there's no ongoing computation), so it's probably not the correct way to call this:
Meta
cargo clippy -V
: clippy 0.1.53 (53cb7b09 2021-06-17)rustc -Vv
:rustup toolchain list
Compared to other issues which report a similar error message:
#2765: I checked, I've not customized the .cargo/config file; it doesn't exist.
#2602: Maybe a duplicate of this one? I also get the error immediately on invoking
cargo-clippy
, but not entirely sure.#2001: I don't run it on a single file as far as I am aware
#2566: Running directly with ~/.cargo/bin/cargo-clippy produces the same error, unlike in this issue; the underlying cause of this issue which skipped one too many arguments doesn't seem to exist anymore in the latest master (but I'm not familiar with the code base)
#2484: I don't override rustc,
where.exe rustc
producesC:\Users\al\.cargo\bin\rustc.exe
and looking at my env vars, RUSTC doesn't seem to exist.Inconsistent between projects
Various other projects seem to work correctly, but for this one, re-cloning or
cargo clean
and running clippy again doesn't. If there's something else I can do to help, please let me know!Edit: the cause of the error is probably a bit fragile; testing a bit more on the same repo gives inconsitent results; sometimes it does work after
cargo clean && cargo clippy --all --tests --all-features -- -Dwarnings
, which doesn't help for easy reproduction :(.The text was updated successfully, but these errors were encountered: