rust-lang / rust-lang/rust-clippy

Doesn't work with custom rustc path

Open
#2,765 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

cargo clippy doesn't work with the following .cargo/config:

[build]
rustc = ".cargo/rustc.sh"

Output:

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/home/val/.cargo/bin/clippy-driver /home/val/Projects/drone-os/drone-stm32/.cargo/rustc.sh - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 101)
--- stderr
error: multiple input filenames provided

.cargo/rustc.sh is just a wrapper:

#!/bin/bash
exec rustc --cfg procmacro2_semver_exempt $@

The wrapper is needed because of https://github.com/rust-lang/cargo/issues/4423.


clippy v0.0.200
rustc 1.27.0-nightly (f0fdaba04 2018-05-15)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce cargo clippy with the shown .cargo/config and .cargo/rustc.sh wrapper, using the reported toolchain versions. Start from the failing clippy-driver invocation and determine why the wrapper receives multiple input filenames; done means the custom rustc path works without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.