Skip to content

Conversation

@togisoft
Copy link

@togisoft togisoft commented Jan 25, 2026

Startup could emit “Failed to discover workspace…” before linkedProjects from workspace/didChangeConfiguration was applied, even when a later fetch succeeded.
Root cause: the initial fetch ran ahead of the config-driven reload, yielding a transient empty workspace and a misleading warning.
Track a lightweight config generation and gate the warning so it only fires after a fetch completes for the current configuration.
Added config_generation and last_workspace_fetch_generation, threaded generation through fetch requests, and recorded completion.
Warning emission is now gated on fetch completion for the current config; fetch flow unchanged.
Fixes #19567.

Tests:

  • Unit: missing_workspace_warning_is_gated_by_fetch_completion
  • Slow: cargo test -p rust-analyzer --test slow-tests

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

false warning from rust-analyzer about "Failed to load workspaces" when linkedProjects is set

2 participants