rust-analyzer/crates/project_model/src
bors[bot] c5354877c9
Merge #10503
10503: Only include targets of packages that are workspace members r=Veykril a=bcully

CargoWorkspace's package list includes packages that are path
dependencies, even if those packages aren't actually members of the
cargo workspace. As a result, rust-analyzer's runnable finder, which
returns the target from the first workspace that has a matching package,
may select the wrong working directory, causing runnables to fail, e.g.,
```
error: package `root` cannot be tested because it requires dev-dependencies and is not a member of the workspace
```

To fix this, we filter out packages that aren't members of the workspace
when searching for targets.

Fixes #7764

Co-authored-by: Brendan Cully <brendan@cully.org>
2021-10-14 11:42:53 +00:00
..
build_scripts.rs Reduce visibility of WorkspaceBuildScripts::run 2021-08-25 18:02:27 +02:00
cargo_workspace.rs Merge #10503 2021-10-14 11:42:53 +00:00
cfg_flag.rs internal: use API stabilized in 1.52 2021-05-06 20:12:15 +03:00
lib.rs Extend CargoConfig.unset_test_crates to allow for efficiently disabling #[cfg(test)] on all crates without having to first load the crate graph 2021-08-26 13:10:14 +02:00
manifest_path.rs internal: use types to remove some unwraps 2021-07-19 21:20:10 +03:00
project_json.rs support non-extern-prelude dependencies 2021-09-28 21:23:46 +02:00
rustc_cfg.rs switch log crate to tracing 2021-08-30 15:11:42 +08:00
sysroot.rs Remove support for old-style sysroot 2021-10-04 18:36:56 +03:00
tests.rs Implicitly depend on test 2021-09-28 21:39:41 +02:00
workspace.rs Only add proc_macro to prelude in proc-macro crates 2021-10-04 18:22:39 +02:00