Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

sccache causes rls builds to fail with "multiple input filenames provided" #703

Open
jrobsonchase opened this issue Feb 7, 2018 · 8 comments
Labels

Comments

@jrobsonchase
Copy link
Contributor

Setting RUSTC_WRAPPER=$HOME/.local/bin/sccache seems to cause rls to fail to compile with multiple input filenames provided. Tested with sccache 2.5 and rls-preview 0.125.0-nightly (dee42bd 2018-02-04).

vscode rust settings:

    "rust-client.channel": "nightly",
    "rust-client.logToFile": true,
    "rust-client.revealOutputChannelOn": "info",

Log with RUSTC_WRAPPER set and RUST_LOG=rls=debug:

DEBUG 2018-02-07T16:35:50Z: rls::server: Language Server starting up. Version: 0.125.0-nightly (dee42bd 2018-02-04)
{"message":"multiple input filenames provided","code":null,"level":"error","spans":[],"children":[],"rendered":"error: multiple input filenames provided\n\n"}
 INFO 2018-02-07T16:35:50Z: rls::build::cargo: cargo failed
cause: Could not compile `rls-testing`.
stdout: 
DEBUG 2018-02-07T16:35:51Z: rls::server: Method not found: textDocument/didClose
@nrc nrc added the bug label Feb 11, 2018
@nrc
Copy link
Member

nrc commented Feb 11, 2018

I'm not sure how sccache works, but I don't think you will be able to use it with the RLS since we use our own version of rustc, so I don't think that will work with RUSTC_WRAPPER

@Dushistov
Copy link

Oh, I thought that rls are just not working yet. Will retry without sccache

@kohensu
Copy link

kohensu commented May 15, 2018

Is is possible for RLS to remove RUSTC_WRAPPER from the environment that is passed to rustc ?
(as long as this feature is not supported by RLS)

This will make RLS working as usual in an environment that use sccache

@prasannavl
Copy link

prasannavl commented Oct 12, 2018

^ -- I think that's a reasonable thing to do.

My logs are flooded with the same multiple input provided. And I don't want to stop using sccache just because of this. If that is indeed the only problem, perhaps, make RLS remove it from it's own env before starting rustc?

It's seems like what must be a simple solution. I don't know why this issue is open for so long unfixed.

@mstange
Copy link

mstange commented Nov 26, 2018

Is there a workaround for this? I think this bug is the reason why the VSCode rust extension doesn't work for me at all.

Xanewok added a commit that referenced this issue Dec 10, 2018
Workaround #703 to prevent obscure failures due to sccache.
bors added a commit to rust-lang/rust that referenced this issue Dec 29, 2018
Update cargo, rls, miri

Update cargo, rls, miri

Added `rustc-workspace-hack` to miri so that it shares the same features for serde as other tools.

cc @alexcrichton

## cargo

25 commits in 2cf1f5dda2f7ed84e94c4d32f643e0f1f15352f0..0d1f1bbeabd5b43a7f3ecfa16540af8e76d5efb4
2018-12-11 03:44:04 +0000 to 2018-12-19 14:45:14 +0000
- Remove Stale bot's configuration (rust-lang/cargo#6463)
- Add labels to issue templates (rust-lang/cargo#6464)
- Fix new man page links. (rust-lang/cargo#6459)
- Fix metabuild compile errors with --message-format=json. (rust-lang/cargo#6432)
- Support alt-registry names in [patch] table. (rust-lang/cargo#6456)
- Update the rustup URL (rust-lang/cargo#6455)
- New man pages. (rust-lang/cargo#6405)
- Reify the DepFingerprint type (rust-lang/cargo#6451)
- Extract Fingerprint::new (rust-lang/cargo#6449)
- Upgrade the metabuild to Rust 2018 (rust-lang/cargo#6448)
- Make edition comparing code consistent (rust-lang/cargo#6450)
- Document `name` and `authors` in [package] (rust-lang/cargo#6447)
- Travis: only use mdbook 0.1.7. (rust-lang/cargo#6443)
- Update git2-curl requirement from 0.8.1 to 0.9.0 (rust-lang/cargo#6439)
- Update git2 requirement from 0.7.5 to 0.8.0 (rust-lang/cargo#6438)
- Display errors when `cargo fix` fails. (rust-lang/cargo#6419)
- cargo fix: fix targets with shared sources. (rust-lang/cargo#6434)
- Fix panic-in-panic in tests. (rust-lang/cargo#6431)
- More Rust 2018 edition cleanups (rust-lang/cargo#6422)
- Cleanup some trait impls for SourceId (rust-lang/cargo#6429)
- Remove a nightly check from doc tests (rust-lang/cargo#6427)
- Replace CargoError with failure::Error (rust-lang/cargo#6425)
- Allow testsuite warnings in dev (rust-lang/cargo#6426)
- add `--dry-run` option to cargo update (rust-lang/cargo#6371)
- Migrate to some Rust 2018 idioms (rust-lang/cargo#6416)

## rls

16 commits in bd5b899afb05e14d33e210ede3da241ca1ca088f..6f5e4bba7b1586fca6e0ea7724cadb5683b2f308
2018-12-10 08:53:00 +0100 to 2018-12-21 17:11:08 +0100
- Update jsonrpc-core (rust-lang/rls#1206)
- Use `home_dir` from `home` crate (rust-lang/rls#1207)
- Update cargo. (rust-lang/rls#1204)
- Fix deprecated `trim_{left,right}` warnings (rust-lang/rls#1203)
- Respect ${CARGO,RUSTUP}_HOME for tooltip relative dirs (rust-lang/rls#1201)
- Separate tooltip tests that require Racer fallback (rust-lang/rls#1200)
- tests: Don't generate tooltip results in tests/fixtures (rust-lang/rls#1199)
- Overhaul fixture handling in tests (rust-lang/rls#1190)
- Don't return symbols with empty names (rust-lang/rls#1193)
- Don't check AppVeyor CI status for bors
- Properly infer full_docs (rust-lang/rls#1192)
- Update cargo (rust-lang/rls#1191)
- Improve hover test_tooltip tests (rust-lang/rls#1175)
- Fix unused warnings (rust-lang/rls#1185)
- Workaround rust-lang/rls#703 to prevent obscure failures due to sccache. (rust-lang/rls#1177)
- Disable travis cache (rust-lang/rls#1182)

## miri

14 commits in bccadeb..6c2fc6d
2018-12-08 11:07:22 +0100 to 2018-12-26 14:28:25 +0100
- use memory::check_bounds_ptr for offset check (rust-lang/miri#589)
- Fix comparing function pointers (rust-lang/miri#587)
- fix for infallible allocation (rust-lang/miri#586)
- fix test for latest nightly (rust-lang/miri#585)
- Treat ref-to-raw cast like a reborrow: do a special kind of retag (rust-lang/miri#572)
- Test cargo-miri on Windows (rust-lang/miri#578)
- Cargo miri tweaks and test that we can exclude tests (rust-lang/miri#580)
- Fix cargo miri test (rust-lang/miri#550)
- fix for latest nightly (rust-lang/miri#574)
- Add rustc-workspace-hack. (rust-lang/miri#575)
- use RUSTC_WRAPPER for the cargo hook (rust-lang/miri#573)
- do not auto-detect the targets in the sysroot, instead specify target manually through env var (rust-lang/miri#570)
- Cleanup: Avoid repeating signatures, get rid of to_bytes hack (rust-lang/miri#568)
- Support building and running with full MIR on foreign architectures, drop support for missing MIR (rust-lang/miri#566)
bors added a commit that referenced this issue Jan 28, 2019
Bump rand from 0.6.4 to 0.6.5

Bumps [rand](https://github.com/rust-random/rand) from 0.6.4 to 0.6.5.
<details>
<summary>Changelog</summary>

*Sourced from [rand's changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md).*

> ## [0.6.5] - 2019-01-28
> ### Crates
> - Update `rand_core` to 0.4 ([#703](https://github-redirect.dependabot.com/rust-random/rand/issues/703))
> - Move `JitterRng` to its own crate ([#685](https://github-redirect.dependabot.com/rust-random/rand/issues/685))
> - Add a warm-bindgen test crate ([#696](https://github-redirect.dependabot.com/rust-random/rand/issues/696))
>
> ### Platforms
> - Fuchsia: Replaced fuchsia-zircon with fuchsia-cprng
>
> ### Doc
> - Use RFC 1946 for doc links ([#691](https://github-redirect.dependabot.com/rust-random/rand/issues/691))
> - Fix some doc links and notes ([#711](https://github-redirect.dependabot.com/rust-random/rand/issues/711))
</details>
<details>
<summary>Commits</summary>

- [`a8dc9ad`](rust-random/rand@a8dc9ad) Merge pull request [#714](https://github-redirect.dependabot.com/rust-random/rand/issues/714) from dhardy/master
- [`625411c`](rust-random/rand@625411c) Update changelog for 0.6.5
- [`76acffe`](rust-random/rand@76acffe) Merge pull request [#712](https://github-redirect.dependabot.com/rust-random/rand/issues/712) from erickt/master
- [`351edce`](rust-random/rand@351edce) Merge pull request [#711](https://github-redirect.dependabot.com/rust-random/rand/issues/711) from dhardy/master
- [`1d0d26c`](rust-random/rand@1d0d26c) Bump version, and document fuchsia_cprng change
- [`9ffaeb7`](rust-random/rand@9ffaeb7) Add rustdoc logo/root link config to sub-crates
- [`ec13800`](rust-random/rand@ec13800) Travis: allow failure of Android test
- [`b22b637`](rust-random/rand@b22b637) Fix external links in SmallRng documentation
- [`6ce5f81`](rust-random/rand@6ce5f81) Add links to the crate pages for the rngs mentioned in StdRng docs
- [`8112daa`](rust-random/rand@8112daa) Merge pull request [#703](https://github-redirect.dependabot.com/rust-random/rand/issues/703) from dhardy/master
- Additional commits viewable in [compare view](rust-random/rand@0.6.4...0.6.5)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=rand&package-manager=cargo&previous-version=0.6.4&new-version=0.6.5)](https://dependabot.com/compatibility-score.html?dependency-name=rand&package-manager=cargo&previous-version=0.6.4&new-version=0.6.5)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
@tuxzz
Copy link

tuxzz commented Jun 28, 2020

The same problem here.
I can't find a workaround so I removed sccache from RUSTC_WRAPPER finally.

@yuhr
Copy link

yuhr commented Oct 7, 2020

Still experiencing

@Avi-D-coder
Copy link

This is not an issue with rust-analyzer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants