Skip to content

Workspace does not automatically reload when a package is added to a workspace crate #16683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
demosdemon opened this issue Feb 26, 2024 · 2 comments
Labels
C-bug Category: bug

Comments

@demosdemon
Copy link

demosdemon commented Feb 26, 2024

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 a workspace 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.tomls represented by the workspace members regardless of how deep they are in the tree.

@demosdemon demosdemon added the C-bug Category: bug label Feb 26, 2024
@alibektas
Copy link
Member

@rustbot claim

@ashaffah
Copy link

ashaffah commented Mar 1, 2024

i have the same issues, i think need something like autoDiscoverWorkspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants