mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Merge pull request #20638 from Kobzol/book-share-cache
Add a FAQ entry about RA and Cargo build lock/cache conflicts
This commit is contained in:
commit
a61c419024
2 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ To run the documentation site locally:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cargo install mdbook
|
cargo install mdbook
|
||||||
|
cargo install mdbook-toc
|
||||||
cargo xtask codegen
|
cargo xtask codegen
|
||||||
cd docs/book
|
cd docs/book
|
||||||
mdbook serve
|
mdbook serve
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,12 @@
|
||||||
rust-analyzer fails to resolve `None`, and thinks you are binding to a variable
|
rust-analyzer fails to resolve `None`, and thinks you are binding to a variable
|
||||||
named `None`. That's usually a sign of a corrupted sysroot. Try removing and re-installing
|
named `None`. That's usually a sign of a corrupted sysroot. Try removing and re-installing
|
||||||
it: `rustup component remove rust-src` then `rustup component install rust-src`.
|
it: `rustup component remove rust-src` then `rustup component install rust-src`.
|
||||||
|
|
||||||
|
### Rust Analyzer and Cargo compete over the build lock
|
||||||
|
|
||||||
|
Rust Analyzer invokes Cargo in the background, and it can thus block manually executed
|
||||||
|
`cargo` commands from making progress (or vice-versa). In some cases, this can also cause
|
||||||
|
unnecessary recompilations caused by cache thrashing. To avoid this, you can configure
|
||||||
|
Rust Analyzer to use a [different target directory](./configuration.md#cargo.targetDir).
|
||||||
|
This will allow both the IDE and Cargo to make progress independently, at the cost of
|
||||||
|
increased disk space usage caused by the duplicated artifact directories.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue