@@ -65,11 +65,11 @@ Next, let's talk about what the inputs to the `Analysis` are, precisely.
65
65
66
66
Rust Analyzer never does any I/O itself, all inputs get passed explicitly via
67
67
the ` AnalysisHost::apply_change ` method, which accepts a single argument, a
68
- ` AnalysisChange ` . [ ` AnalysisChange ` ] is a builder for a single change
68
+ ` Change ` . [ ` Change ` ] is a builder for a single change
69
69
"transaction", so it suffices to study its methods to understand all of the
70
70
input data.
71
71
72
- [ `AnalysisChange ` ] : https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01 /crates/ide_api /src/lib .rs#L119-L167
72
+ [ `Change ` ] : https://github.com/rust-analyzer/rust-analyzer/blob/master /crates/base_db /src/change .rs#L14-L89
73
73
74
74
The ` (add|change|remove)_file ` methods control the set of the input files, where
75
75
each file has an integer id (` FileId ` , picked by the client), text (` String ` )
@@ -158,7 +158,7 @@ it should be possible to dynamically reconfigure it later without restart.
158
158
[ main_loop.rs#L62-L70] ( https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L62-L70 )
159
159
160
160
The [ ` ProjectModel ` ] we get after this step is very Cargo and sysroot specific,
161
- it needs to be lowered to get the input in the form of ` AnalysisChange ` . This
161
+ it needs to be lowered to get the input in the form of ` Change ` . This
162
162
happens in [ ` ServerWorldState::new ` ] method. Specifically
163
163
164
164
* Create a ` SourceRoot ` for each Cargo package and sysroot.
@@ -175,7 +175,7 @@ of the main loop, just like any other change. Here's where we handle:
175
175
* [ File system changes] ( https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L194 )
176
176
* [ Changes from the editor] ( https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L377 )
177
177
178
- After a single loop's turn, we group the changes into one ` AnalysisChange ` and
178
+ After a single loop's turn, we group the changes into one ` Change ` and
179
179
[ apply] it. This always happens on the main thread and blocks the loop.
180
180
181
181
[ apply ] : https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/server_world.rs#L216
@@ -256,7 +256,7 @@ database.
256
256
[ `RootDatabase` ] : https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ide_api/src/db.rs#L88-L134
257
257
258
258
Salsa input queries are defined in [ ` FilesDatabase ` ] (which is a part of
259
- ` RootDatabase ` ). They closely mirror the familiar ` AnalysisChange ` structure:
259
+ ` RootDatabase ` ). They closely mirror the familiar ` Change ` structure:
260
260
indeed, what ` apply_change ` does is it sets the values of input queries.
261
261
262
262
[ `FilesDatabase` ] : https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/base_db/src/input.rs#L150-L174
0 commit comments