Expand description
Project loading & configuration updates.
This is quite tricky. The main problem is time and changes – there’s no
fixed “project” rust-analyzer is working with, “current project” is itself
mutable state. For example, when the user edits Cargo.toml by adding a new
dependency, project model changes. What’s more, switching project model is
not instantaneous – it takes time to run cargo metadata and (for proc
macros) cargo check.
The main guiding principle here is, as elsewhere in rust-analyzer, robustness. We try not to assume that the project model exists or is correct. Instead, we try to provide a best-effort service. Even if the project is currently loading and we don’t have a full project model, we still want to respond to various requests.
Enums§
Functions§
- eq_
ignore_ 🔒underscore - Similar to
str::eq_ignore_ascii_casebut instead of ignoring case, we say that-and_are equal. - should_
refresh_ 🔒for_ change - ws_
to_ crate_ graph