rust-analyzer
rust-analyzer copied to clipboard
Workspace does not automatically reload when a package is added to a workspace crate
rust-analyzer version: rust-analyzer version: 0.3.1860-standalone (5346002d0 2024-02-25)
rustc version: rustc 1.78.0-nightly (6672c16af 2024-02-17)
relevant settings:
- A cargo workspace with a root
Cargo.tomlfile with only aworkspacetable and no direct code units. - A workspace setting with a glob; e.g.,
[workspace]
members = ["crates/*"]
resolver = "2"
- A blank crate in
cratesdirectory (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.tomls represented by the workspace members regardless of how deep they are in the tree.
@rustbot claim
i have the same issues, i think need something like autoDiscoverWorkspace