-
Notifications
You must be signed in to change notification settings - Fork 254
Add a high-level overview of the RLS #1257
Conversation
h-michael
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have nitpicks :)
nrc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One general comment: it would be useful to map the abstract descriptions here to modules (or even functions) in the code.
| @@ -0,0 +1,174 @@ | |||
| # Rust Language Server (RLS) - Architecture | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link this file from README.md and contributing.md
|
|
||
| When initialized, (unless overriden by custom build command) RLS `cargo check`s the current project and collects inter-crate [1] dependency graph along with exact crate compilation invocations, which is used later to run the compiler again itself (but in-process). | ||
|
|
||
| In-process compilation runs return populated internal data structures (`rls_data::Analysis`), which are further lowered and cross-referenced to expose a low-level indexing API (`rls_analysis::Analysis`) to finally be consumed by the Rust Language Server in order to answer relevant LSP [2] queries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to say why we do in-process and also when (and why) we do standard out of process build
architecture.md
Outdated
| This [crate](https://github.com/rust-dev-tools/rls-analysis) is responsible for loading and stitching multiple of | ||
| the `rls_data::Analysis` data structures into a single, coherent interface. | ||
|
|
||
| Main reason behind that is that each of those structures contains data centric |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another important reason is that rls-analysis is the 'stable' API, whereas the JSON data format can change at any time and should be considered an implementation detail
architecture.md
Outdated
| build orchestration, and coordination of other components, such as | ||
| * Racer for autocompletion | ||
| * Cargo for project layout detection and initial build coordination | ||
| * internal VFS for handling in-memory text buffers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spell out VFS here
architecture.md
Outdated
| * Cargo for project layout detection and initial build coordination | ||
| * internal VFS for handling in-memory text buffers, | ||
| * rls-analysis serving as our knowledge database | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add Clippy and Rustfmt to the list (and then I think you can remove "etc")
|
If you'd like, I want you to write about the relationship between rls and racer :) |
Co-Authored-By: Xanewok <Xanewok@gmail.com>
|
Thank you for the review! I'll merge this now so we can easily collaborate on the document together. @h-michael I'd very much appreciate that, yeah! Mind appending this section to the bottom of the document? |
submodule: update rls from c9d25b to e2145d Update rls rust-lang/rls@c9d25b6...e2145d rust-lang/rls#1276 - h-michael:clippy, r=Xanewok rust-lang/rls#1269 - rust-lang:dependabot/cargo/rand-0.6.5, r=Xanewok Remove extra backticks in contributing.md rust-lang/rls#1267 from h-michael/contributingmd rust-lang/rls#1268 from matthiaskrgr/rustup rust-lang/rls#1262 from rust-lang/dependabot/cargo/tokio-0.1.15 rust-lang/rls#1264 - h-michael:pub-crate, r=alexheretic rust-lang/rls#1261 - rust-lang:dependabot/cargo/tokio-timer-0.2.9, r=Xanewok rust-lang/rls#1263 - Xanewok:update-clippy, r=Xanewok rust-lang/rls#1257 from Xanewok/architecture rust-lang/rls#1258 - rust-lang:dependabot/cargo/lsp-types-0.55.1, r=Xanewok rust-lang/rls#1255 - Xanewok:you-only-complete-once-fool, r=Xanewok rust-lang/rls#1252 - rust-lang:dependabot/cargo/cargo_metadata-0.7.0, r=alexheretic rust-lang/rls#1253 - rust-lang:dependabot/cargo/lsp-types-0.55.0, r=Xanewok rust-lang/rls#1254 - rust-lang:dependabot/cargo/serde_json-1.0.37, r=Xanewok dependabot: Explicitly list default allowed_updates dependabot: Add automerge strategy for clippy_lints rust-lang/rls#1251 - Xanewok:translate-deglob-test, r=Xanewok rust-lang/rls#1250 from alexheretic/master rust-lang/rls#1244 - Xanewok:translate-tests, r=alexheretic rust-lang/rls#1247 - alexheretic:register-more-clippy, r=Xanewok rust-lang/rls#1230 - emilio:testing-testing, r=Xanewok rust-lang/rls#1246 from alexheretic/did-save-manifest Merge branch 'beta-version-bump' of https://github.com/rust-lang-nursery/rls
submodule: update rls from c9d25b to f331ff7 Update rls rust-lang/rls@c9d25b6...e2145d rust-lang/rls#1276 - h-michael:clippy, r=Xanewok rust-lang/rls#1269 - rust-lang:dependabot/cargo/rand-0.6.5, r=Xanewok Remove extra backticks in contributing.md rust-lang/rls#1267 from h-michael/contributingmd rust-lang/rls#1268 from matthiaskrgr/rustup rust-lang/rls#1262 from rust-lang/dependabot/cargo/tokio-0.1.15 rust-lang/rls#1264 - h-michael:pub-crate, r=alexheretic rust-lang/rls#1261 - rust-lang:dependabot/cargo/tokio-timer-0.2.9, r=Xanewok rust-lang/rls#1263 - Xanewok:update-clippy, r=Xanewok rust-lang/rls#1257 from Xanewok/architecture rust-lang/rls#1258 - rust-lang:dependabot/cargo/lsp-types-0.55.1, r=Xanewok rust-lang/rls#1255 - Xanewok:you-only-complete-once-fool, r=Xanewok rust-lang/rls#1252 - rust-lang:dependabot/cargo/cargo_metadata-0.7.0, r=alexheretic rust-lang/rls#1253 - rust-lang:dependabot/cargo/lsp-types-0.55.0, r=Xanewok rust-lang/rls#1254 - rust-lang:dependabot/cargo/serde_json-1.0.37, r=Xanewok dependabot: Explicitly list default allowed_updates dependabot: Add automerge strategy for clippy_lints rust-lang/rls#1251 - Xanewok:translate-deglob-test, r=Xanewok rust-lang/rls#1250 from alexheretic/master rust-lang/rls#1244 - Xanewok:translate-tests, r=alexheretic rust-lang/rls#1247 - alexheretic:register-more-clippy, r=Xanewok rust-lang/rls#1230 - emilio:testing-testing, r=Xanewok rust-lang/rls#1246 from alexheretic/did-save-manifest Merge branch 'beta-version-bump' of https://github.com/rust-lang-nursery/rls
This is the initial draft, which serves as reading material for the upcoming IDE discussion at Rust All-Hands.
Reviews, ideas about what could we include and the actual content welcome!
Rendered