Skip to content
New issue

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

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

Already on GitHub? # to your account

sccache no longer works with rustc nightly #488

Closed
Jake-Shadle opened this issue Aug 2, 2019 · 1 comment
Closed

sccache no longer works with rustc nightly #488

Jake-Shadle opened this issue Aug 2, 2019 · 1 comment
Assignees

Comments

@Jake-Shadle
Copy link
Contributor

rustc 1.38.0-nightly (435236b88 2019-08-01)

It looks like rust-lang/rust@1731233 changes how rustc emits diagnostics, if you try and use a nightly with this commit, you get an error when using sccache

error: Could not compile `rand_core`.

Caused by:
  process didn't exit successfully: `sccache rustc --crate-name rand_core /home/jake/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/rand_core-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="alloc"' --cfg 'feature="std"' -C metadata=073618b59550eeb8 -C extra-filename=-073618b59550eeb8 --out-dir /home/jake/code/ark/target/debug/deps -L dependency=/home/jake/code/ark/target/debug/deps --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: cannot specify the `--color` option with `--json`

This occurs even if you specify --color=never due to how it checks the cmd line options, but regardless if it's a bug, it looks like sccache might have to change how it handles output from rustc due to the way the diagnostic messages are embedded in the JSON output.

@TriplEight
Copy link

The same happened in our CI.

     Running `sccache rustc --edition=2018 --crate-name substrate_peerset /ci-cache/polkadot/cargo/test-linux-stable/git/checkouts/substrate-7e08433d4c370a21/f9e5a37/core/peerset/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=485443f3c36d6bd9 -C extra-filename=-485443f3c36d6bd9 --out-dir /builds/parity/polkadot/target/release/deps -L dependency=/builds/parity/polkadot/target/release/deps --extern futures=/builds/parity/polkadot/target/release/deps/libfutures-e20cef6d741e467c.rlib --extern libp2p=/builds/parity/polkadot/target/release/deps/liblibp2p-26954cd7035fe93a.rlib --extern linked_hash_map=/builds/parity/polkadot/target/release/deps/liblinked_hash_map-9b4a2cb2925564ff.rlib --extern log=/builds/parity/polkadot/target/release/deps/liblog-4d22979b7306b0e1.rlib --extern lru_cache=/builds/parity/polkadot/target/release/deps/liblru_cache-734476c76a391adb.rlib --extern serde_json=/builds/parity/polkadot/target/release/deps/libserde_json-def43a175af19f3e.rlib --cap-lints allow -Cdebug-assertions=y -L native=/builds/parity/polkadot/target/release/build/clear_on_drop-7f8dbb427ac5176e/out -L native=/builds/parity/polkadot/target/release/build/backtrace-sys-c0d87adb88799e87/out -L native=/builds/parity/polkadot/target/release/build/ring-70994a1355f82e1f/out -L native=/builds/parity/polkadot/target/release/build/libz-sys-753a3fb573bf005f/out/build -L native=/builds/parity/polkadot/target/release/build/miniz-sys-0c30310504b0545b/out`
     Running `sccache rustc --edition=2018 --crate-name halt test-parachains/halt/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=8b4c68e010119936 -C extra-filename=-8b4c68e010119936 --out-dir /builds/parity/polkadot/target/release/deps -L dependency=/builds/parity/polkadot/target/release/deps -Cdebug-assertions=y`
     Running `sccache rustc --edition=2018 --crate-name halt test-parachains/halt/src/lib.rs --color never --emit=dep-info,metadata,link -C opt-level=3 --test --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=e173ba0fc5aeec17 -C extra-filename=-e173ba0fc5aeec17 --out-dir /builds/parity/polkadot/target/release/deps -L dependency=/builds/parity/polkadot/target/release/deps -Cdebug-assertions=y`
error: failed to run custom build command for `adder v0.1.0 (/builds/parity/polkadot/test-parachains/adder)`

Caused by:
  process didn't exit successfully: `/builds/parity/polkadot/target/release/build/adder-0dee98231ba4a6e9/build-script-build` (exit code: 1)
--- stdout
Executing build command: "rustup" "run" "nightly" "cargo" "build" "--target=wasm32-unknown-unknown" "--manifest-path=/builds/parity/polkadot/target/release/wbuild/adder/Cargo.toml" "--release"

@chmanchester chmanchester self-assigned this Aug 5, 2019
chmanchester added a commit to chmanchester/sccache that referenced this issue Aug 5, 2019
chmanchester added a commit to chmanchester/sccache that referenced this issue Aug 6, 2019
SimonSapin added a commit to servo/servo that referenced this issue Oct 18, 2019
bors-servo pushed a commit to servo/servo that referenced this issue Oct 18, 2019
SimonSapin added a commit to servo/servo that referenced this issue Oct 21, 2019
bors-servo pushed a commit to servo/servo that referenced this issue Oct 21, 2019
SimonSapin added a commit to servo/servo that referenced this issue Oct 21, 2019
bors-servo pushed a commit to servo/servo that referenced this issue Oct 21, 2019
bors-servo pushed a commit to servo/servo that referenced this issue Oct 22, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants