9641: docs: publish Explaining Rust Analyzer series r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-07-20 09:57:12 +00:00 committed by GitHub
commit dba0d8b26b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View File

@ -10,7 +10,7 @@
use crossbeam_channel::{select, Receiver};
use ide::{FileId, PrimeCachesProgress};
use ide_db::base_db::VfsPath;
use lsp_server::{Connection, Notification, Request, Response};
use lsp_server::{Connection, Notification, Request};
use lsp_types::notification::Notification as _;
use vfs::ChangeKind;
@ -60,7 +60,7 @@ enum Event {
#[derive(Debug)]
pub(crate) enum Task {
Response(Response),
Response(lsp_server::Response),
Diagnostics(Vec<(FileId, Vec<lsp_types::Diagnostic>)>),
PrimeCaches(PrimeCachesProgress),
FetchWorkspace(ProjectWorkspaceProgress),
@ -466,7 +466,7 @@ fn on_request(&mut self, request_received: Instant, req: Request) -> Result<()>
self.register_request(&req, request_received);
if self.shutdown_requested {
self.respond(Response::new_err(
self.respond(lsp_server::Response::new_err(
req.id,
lsp_server::ErrorCode::InvalidRequest as i32,
"Shutdown already requested.".to_owned(),
@ -674,7 +674,7 @@ fn on_notification(&mut self, not: Notification) -> Result<()> {
},
|this, resp| {
log::debug!("config update response: '{:?}", resp);
let Response { error, result, .. } = resp;
let lsp_server::Response { error, result, .. } = resp;
match (error, result) {
(Some(err), _) => {

View File

@ -3,13 +3,8 @@
This document describes the high-level architecture of rust-analyzer.
If you want to familiarize yourself with the code base, you are just in the right place!
See also the [guide](./guide.md), which walks through a particular snapshot of rust-analyzer code base.
Yet another resource is this playlist with videos about various parts of the analyzer:
https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE
Note that the guide and videos are pretty dated, this document should be, in general, fresher.
You might also enjoy ["Explaining Rust Analyzer"](https://www.youtube.com/playlist?list=PLhb66M_x9UmrqXhQuIpWC5VgTdrGxMx3y) series on YouTube.
It goes deeper than what is covered in this document, but will take some time to watch.
See also these implementation-related blog posts:
@ -19,6 +14,9 @@ See also these implementation-related blog posts:
* https://rust-analyzer.github.io/blog/2020/09/28/how-to-make-a-light-bulb.html
* https://rust-analyzer.github.io/blog/2020/10/24/introducing-ungrammar.html
For older, by now mostly outdated stuff, see the [guide](./guide.md) and [another playlist](https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE).
## Bird's Eye View
![](https://user-images.githubusercontent.com/4789492/107129398-0ab70f00-687a-11eb-9bfc-d4eb023aec06.png)