rust-analyzer
rust-analyzer copied to clipboard
`Run Tests | Debug` enter different PWDs
rust-analyzer version: v0.4.1214
rustc version: 1.63.0
relevant settings: none
Given a project structure like this:
- test_ra_pwd/
- sub/
- Cargo.toml
- src/
- main.rs
- Cargo.toml
- Cargo.lock
- target/
In main.rs, Run Tests sets PWD to test_ra_pwd/sub but Debug sets PWD to test_ra_pwd.
Debug should set PWD to the same one as Run Tests to better simulate the actual running environment.
I made a working example: https://github.com/Banyc/test_ra_pwd
I've found a 2-year-old duplicate: https://github.com/rust-lang/rust-analyzer/issues/6422