You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[package]
edition = "2021"
name = "placeholder"
version = "0.1.0"
[dependencies]
mydep = { path = "libs/dep" }
If I open libs/dep/ as a separate VSCode project & run a test in src/lib.rs everything works as expected. If I open project/ instead and then try to run a test from libs/dep/src/lib.rs, it fails:
If I click "Debug test", it prints "could not find Cargo.toml in /home/vlovich or any parent directory"
If I click "Run test", it runs the test command (Executing task: cargo test -- --exact --nocapture) but I think it's in the project/ folder instead of project/libs/dep because it builds but finds 0 tests to run and it lists "placeholder" as the package that was built.
Ideally I think rust-analyzer would scan up from the current file to find the directory of the Cargo.toml instead of assuming it's the workspace root.
rust-analyzer version: Tried & failed in the same way on 0.4.1242, 0.4.1237, and 0.3.1238. I saw #13404 but this looks like a different issue since it's still present on stable.
I have:
project/Cargo.toml:
If I open
libs/dep/
as a separate VSCode project & run a test insrc/lib.rs
everything works as expected. If I openproject/
instead and then try to run a test fromlibs/dep/src/lib.rs
, it fails:project/
folder instead ofproject/libs/dep
because it builds but finds 0 tests to run and it lists "placeholder" as the package that was built.Ideally I think rust-analyzer would scan up from the current file to find the directory of the Cargo.toml instead of assuming it's the workspace root.
rust-analyzer version: Tried & failed in the same way on 0.4.1242, 0.4.1237, and 0.3.1238. I saw #13404 but this looks like a different issue since it's still present on stable.
rustc version: rustc 1.64.0 (a55dd71d5 2022-09-19)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)The text was updated successfully, but these errors were encountered: