Lazy Workspace/Project Discovery #17537
Labels
A-project-model
project model and workspace related issues
C-Architecture
Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )
E-medium
Few notes:
Anyway! Project discovery should be entirely lazy. This change makes the following easier:
rust-analyzer.toml
in the rustlings repo, IDE functionality would just work for them.To make this change happen, the currently eager (that is, they occur on startup/workspace folder change)
ProjectManifest::discover_all
+ cargo metadata-style operations would become lazy,rust-analyzer.workspace.DiscoverCommand
-style operations that only happen after startup. This would mean several things:cargo_metadata::MetadataCommand::new()
would become the default mode forflycheck/src/json_workspace.rs
(see this comment. That file would no longer be JSON workspace-specific, but it would also make "project discovery" a first-class concept in rust-analyzer.rust-analyzer.linkedProjects
would technically be lazily evaluated, but if any value is set, it would effectively be "eagerly" evaluated.To support this change, I think three things need to happen:
linked_projects
#17246 needs to land.The text was updated successfully, but these errors were encountered: