Skip to content

Commit dba0d8b

Browse files
bors[bot]matklad
andauthored
Merge #9641
9641: docs: publish Explaining Rust Analyzer series r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 84302bd + efa4a36 commit dba0d8b

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

crates/rust-analyzer/src/main_loop.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use always_assert::always;
1010
use crossbeam_channel::{select, Receiver};
1111
use ide::{FileId, PrimeCachesProgress};
1212
use ide_db::base_db::VfsPath;
13-
use lsp_server::{Connection, Notification, Request, Response};
13+
use lsp_server::{Connection, Notification, Request};
1414
use lsp_types::notification::Notification as _;
1515
use vfs::ChangeKind;
1616

@@ -60,7 +60,7 @@ enum Event {
6060

6161
#[derive(Debug)]
6262
pub(crate) enum Task {
63-
Response(Response),
63+
Response(lsp_server::Response),
6464
Diagnostics(Vec<(FileId, Vec<lsp_types::Diagnostic>)>),
6565
PrimeCaches(PrimeCachesProgress),
6666
FetchWorkspace(ProjectWorkspaceProgress),
@@ -466,7 +466,7 @@ impl GlobalState {
466466
self.register_request(&req, request_received);
467467

468468
if self.shutdown_requested {
469-
self.respond(Response::new_err(
469+
self.respond(lsp_server::Response::new_err(
470470
req.id,
471471
lsp_server::ErrorCode::InvalidRequest as i32,
472472
"Shutdown already requested.".to_owned(),
@@ -674,7 +674,7 @@ impl GlobalState {
674674
},
675675
|this, resp| {
676676
log::debug!("config update response: '{:?}", resp);
677-
let Response { error, result, .. } = resp;
677+
let lsp_server::Response { error, result, .. } = resp;
678678

679679
match (error, result) {
680680
(Some(err), _) => {

docs/dev/architecture.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,8 @@
33
This document describes the high-level architecture of rust-analyzer.
44
If you want to familiarize yourself with the code base, you are just in the right place!
55

6-
See also the [guide](./guide.md), which walks through a particular snapshot of rust-analyzer code base.
7-
8-
Yet another resource is this playlist with videos about various parts of the analyzer:
9-
10-
https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE
11-
12-
Note that the guide and videos are pretty dated, this document should be, in general, fresher.
6+
You might also enjoy ["Explaining Rust Analyzer"](https://www.youtube.com/playlist?list=PLhb66M_x9UmrqXhQuIpWC5VgTdrGxMx3y) series on YouTube.
7+
It goes deeper than what is covered in this document, but will take some time to watch.
138

149
See also these implementation-related blog posts:
1510

@@ -19,6 +14,9 @@ See also these implementation-related blog posts:
1914
* https://rust-analyzer.github.io/blog/2020/09/28/how-to-make-a-light-bulb.html
2015
* https://rust-analyzer.github.io/blog/2020/10/24/introducing-ungrammar.html
2116

17+
For older, by now mostly outdated stuff, see the [guide](./guide.md) and [another playlist](https://www.youtube.com/playlist?list=PL85XCvVPmGQho7MZkdW-wtPtuJcFpzycE).
18+
19+
2220
## Bird's Eye View
2321

2422
![](https://user-images.githubusercontent.com/4789492/107129398-0ab70f00-687a-11eb-9bfc-d4eb023aec06.png)

0 commit comments

Comments
 (0)