Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config build.rustc-wrapper is unused. #7745

Closed
oberzs opened this issue Dec 26, 2019 · 6 comments
Closed

Config build.rustc-wrapper is unused. #7745

oberzs opened this issue Dec 26, 2019 · 6 comments
Labels
C-bug Category: bug

Comments

@oberzs
Copy link

oberzs commented Dec 26, 2019

Problem

I added build.rustc-wrapper = "sccache" to use the sccache in my builds, but when running any cargo command, it says that build.rustc-wrapper is an unused key.
I found the key in The Cargo Book (https://doc.rust-lang.org/cargo/guide/build-cache.html).

Steps

  1. Install sccache cargo install sccache
  2. Add build.rustc-wrapper = "sccache" to Cargo config ($CARGO_HOME/config)
  3. Run cargo build in any project

Notes

Output of cargo version: cargo 1.40.0 (bc8e4c8 2019-11-22)

Rust version: 1.40.0
OS: Windows 10

@oberzs oberzs added the C-bug Category: bug label Dec 26, 2019
@ehuss
Copy link
Contributor

ehuss commented Dec 27, 2019

Thanks, this has already been fixed via #7575

@ehuss ehuss closed this as completed Dec 27, 2019
drahnr added a commit to drahnr/sccache that referenced this issue Mar 18, 2020
Removes a chunk from the readme regarding a false positive
rustc-wrapper entry not being used, which is closed since 1.40.0 .
Cargo issue: rust-lang/cargo#7745
froydnj pushed a commit to mozilla/sccache that referenced this issue Mar 18, 2020
Removes a chunk from the readme regarding a false positive
rustc-wrapper entry not being used, which is closed since 1.40.0 .
Cargo issue: rust-lang/cargo#7745
@lebensterben
Copy link

Hi, I still see the error message on cargo 1.44.0-nightly.

@ehuss
Copy link
Contributor

ehuss commented Apr 19, 2020

Hi, I still see the error message on cargo 1.44.0-nightly.

Can you show a sample config file that reproduces the issue and the text of the warning? I can't seem to reproduce it.

@lebensterben
Copy link

@ehuss
I installed sccache with cargo install sccache, and have these contents in my ~/.cargo/config file:

[build]
rustc_wrapper = "sccache"

[expand]
theme = "Monokai Extended Origin"

where sccache is in the $PATH, I've also tried setting it to it's absolute path.

Then, when I run cargo build, cargo test, or cargo clippy, I always see the unused config key in build.rustc_wrapper warning.

@ehuss
Copy link
Contributor

ehuss commented Apr 21, 2020

It should be rustc-wrapper with a dash, not an underscore.

@lebensterben
Copy link

It should be rustc-wrapper with a dash, not an underscore.

@ehuss You're right! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants