Open
Description
rust-analyzer version: rust-analyzer version: 0.3.1860-standalone (5346002 2024-02-25)
rustc version: rustc 1.78.0-nightly (6672c16af 2024-02-17)
relevant settings:
- A cargo workspace with a root
Cargo.toml
file with only aworkspace
table and no direct code units. - A workspace setting with a glob; e.g.,
[workspace]
members = ["crates/*"]
resolver = "2"
- A blank crate in
crates
directory (cargo new --vcs none --bin crates/test-bin
)
steps to reproduce:
- Open VS Code with a workspace project structure and glob members as described above.
- Add a new package to a crate (
cargo new -p test-bin clap
) - Observe RA does not reload
- Observe RA does not provide typeahead hints for
clap
. - Manually trigger "Reload Workspace"
- Observe RA provides typeahead hints for
clap
.
The bug report for #16550 made me realize #10442 is likely related. RA should always check for Cargo.toml
s represented by the workspace members regardless of how deep they are in the tree.