]> git.lizzy.rs Git - rust.git/commitdiff
Merge #7107
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Thu, 31 Dec 2020 13:04:29 +0000 (13:04 +0000)
committerGitHub <noreply@github.com>
Thu, 31 Dec 2020 13:04:29 +0000 (13:04 +0000)
7107: add working dir to cargo metadata fail messages r=matklad a=lf-

Context: I was having an error in my workspace config that I couldn't figure out without this added output. In particular, I have a Code workspace with a docs folder and one of my top level crates [which each have their own custom target], which was picking up the Cargo workspace level Cargo.toml incorrectly [which in my project should not ever be used for the editor], and ultimately had to override it with `linkedProjects`.

Here's a sample of the changed output:

```
[INFO rust_analyzer::main_loop] handle_event(Workspaces([Err(Failed to read Cargo metadata from Cargo.toml file /home/jade/dev/mu/Cargo.toml, cargo 1.50.0-nightly (75d5d8cff 2020-12-22)

Caused by:
    0: Failed to run `cargo metadata --manifest-path /home/jade/dev/mu/Cargo.toml` in `/home/jade/dev/mu`
    1: Error during execution of `cargo metadata`: error: target path "../../riscv64imac-mu-shoo-elf.json" is not a valid file

       Caused by:
         No such file or directory (os error 2)
       ), Err(Failed to read Cargo metadata from Cargo.toml file /home/jade/dev/mu/shoo/Cargo.toml, cargo 1.50.0-nightly (75d5d8cff 2020-12-22)

Caused by:
    0: Failed to run `cargo metadata --manifest-path /home/jade/dev/mu/shoo/Cargo.toml` in `/home/jade/dev/mu/shoo`
    1: Error during execution of `cargo metadata`: error: target path "../../riscv64imac-mu-shoo-elf.json" is not a valid file

       Caused by:
         No such file or directory (os error 2)
       )]))
```

Co-authored-by: lf- <lf-@users.noreply.github.com>

Trivial merge