aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-27 18:32:33 +0000
committerAleksey Kladov <[email protected]>2019-11-27 18:35:06 +0000
commit757e593b253b4df7e6fc8bf15a4d4f34c9d484c5 (patch)
treed972d3a7e6457efdb5e0c558a8350db1818d07ae /docs
parentd9a36a736bfb91578a36505e7237212959bb55fe (diff)
rename ra_ide_api -> ra_ide
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/README.md2
-rw-r--r--docs/dev/architecture.md12
-rw-r--r--docs/dev/guide.md24
3 files changed, 19 insertions, 19 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 0823ca09a..0f64d7e5f 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -14,7 +14,7 @@ To learn more about how rust-analyzer works, see
14 14
15We also publish rustdoc docs to pages: 15We also publish rustdoc docs to pages:
16 16
17https://rust-analyzer.github.io/rust-analyzer/ra_ide_api/ 17https://rust-analyzer.github.io/rust-analyzer/ra_ide/
18 18
19Various organizational and process issues are discussed in this document. 19Various organizational and process issues are discussed in this document.
20 20
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 6fd396dee..629645757 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -106,7 +106,7 @@ guessing a HIR for a particular source position.
106 106
107Underneath, HIR works on top of salsa, using a `HirDatabase` trait. 107Underneath, HIR works on top of salsa, using a `HirDatabase` trait.
108 108
109### `crates/ra_ide_api` 109### `crates/ra_ide`
110 110
111A stateful library for analyzing many Rust files as they change. `AnalysisHost` 111A stateful library for analyzing many Rust files as they change. `AnalysisHost`
112is a mutable entity (clojure's atom) which holds the current state, incorporates 112is a mutable entity (clojure's atom) which holds the current state, incorporates
@@ -124,11 +124,11 @@ offsets and strings as output. This works on top of rich code model powered by
124 124
125### `crates/ra_lsp_server` 125### `crates/ra_lsp_server`
126 126
127An LSP implementation which wraps `ra_ide_api` into a language server protocol. 127An LSP implementation which wraps `ra_ide` into a language server protocol.
128 128
129### `ra_vfs` 129### `ra_vfs`
130 130
131Although `hir` and `ra_ide_api` don't do any IO, we need to be able to read 131Although `hir` and `ra_ide` don't do any IO, we need to be able to read
132files from disk at the end of the day. This is what `ra_vfs` does. It also 132files from disk at the end of the day. This is what `ra_vfs` does. It also
133manages overlays: "dirty" files in the editor, whose "true" contents is 133manages overlays: "dirty" files in the editor, whose "true" contents is
134different from data on disk. This is more or less the single really 134different from data on disk. This is more or less the single really
@@ -162,13 +162,13 @@ disk. For this reason, we try to avoid writing too many tests on this boundary:
162in a statically typed language, it's hard to make an error in the protocol 162in a statically typed language, it's hard to make an error in the protocol
163itself if messages are themselves typed. 163itself if messages are themselves typed.
164 164
165The middle, and most important, boundary is `ra_ide_api`. Unlike 165The middle, and most important, boundary is `ra_ide`. Unlike
166`ra_lsp_server`, which exposes API, `ide_api` uses Rust API and is intended to 166`ra_lsp_server`, which exposes API, `ide` uses Rust API and is intended to
167use by various tools. Typical test creates an `AnalysisHost`, calls some 167use by various tools. Typical test creates an `AnalysisHost`, calls some
168`Analysis` functions and compares the results against expectation. 168`Analysis` functions and compares the results against expectation.
169 169
170The innermost and most elaborate boundary is `hir`. It has a much richer 170The innermost and most elaborate boundary is `hir`. It has a much richer
171vocabulary of types than `ide_api`, but the basic testing setup is the same: we 171vocabulary of types than `ide`, but the basic testing setup is the same: we
172create a database, run some queries, assert result. 172create a database, run some queries, assert result.
173 173
174For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for 174For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for
diff --git a/docs/dev/guide.md b/docs/dev/guide.md
index abbe4c154..c163a74b3 100644
--- a/docs/dev/guide.md
+++ b/docs/dev/guide.md
@@ -40,8 +40,8 @@ terms of files and offsets, and **not** in terms of Rust concepts like structs,
40traits, etc. The "typed" API with Rust specific types is slightly lower in the 40traits, etc. The "typed" API with Rust specific types is slightly lower in the
41stack, we'll talk about it later. 41stack, we'll talk about it later.
42 42
43[`AnalysisHost`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/lib.rs#L265-L284 43[`AnalysisHost`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/lib.rs#L265-L284
44[`Analysis`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/lib.rs#L291-L478 44[`Analysis`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/lib.rs#L291-L478
45 45
46The reason for this separation of `Analysis` and `AnalysisHost` is that we want to apply 46The reason for this separation of `Analysis` and `AnalysisHost` is that we want to apply
47changes "uniquely", but we might also want to fork an `Analysis` and send it to 47changes "uniquely", but we might also want to fork an `Analysis` and send it to
@@ -69,7 +69,7 @@ the `AnalysisHost::apply_change` method, which accepts a single argument, a
69"transaction", so it suffices to study its methods to understand all of the 69"transaction", so it suffices to study its methods to understand all of the
70input data. 70input data.
71 71
72[`AnalysisChange`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/lib.rs#L119-L167 72[`AnalysisChange`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/lib.rs#L119-L167
73 73
74The `(add|change|remove)_file` methods control the set of the input files, where 74The `(add|change|remove)_file` methods control the set of the input files, where
75each file has an integer id (`FileId`, picked by the client), text (`String`) 75each file has an integer id (`FileId`, picked by the client), text (`String`)
@@ -253,7 +253,7 @@ All analyzer information is stored in a salsa database. `Analysis` and
253`AnalysisHost` types are newtype wrappers for [`RootDatabase`] -- a salsa 253`AnalysisHost` types are newtype wrappers for [`RootDatabase`] -- a salsa
254database. 254database.
255 255
256[`RootDatabase`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/db.rs#L88-L134 256[`RootDatabase`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/db.rs#L88-L134
257 257
258Salsa input queries are defined in [`FilesDatabase`] (which is a part of 258Salsa 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 `AnalysisChange` structure:
@@ -565,11 +565,11 @@ the type to completion.
565[schedule it on the threadpool]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L428 565[schedule it on the threadpool]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L428
566[catch]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L436-L442 566[catch]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_lsp_server/src/main_loop.rs#L436-L442
567[the handler]: https://salsa.zulipchat.com/#narrow/stream/181542-rfcs.2Fsalsa-query-group/topic/design.20next.20steps 567[the handler]: https://salsa.zulipchat.com/#narrow/stream/181542-rfcs.2Fsalsa-query-group/topic/design.20next.20steps
568[ask analysis for completion]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/lib.rs#L439-L444 568[ask analysis for completion]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/lib.rs#L439-L444
569[completion implementation]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion.rs#L46-L62 569[completion implementation]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion.rs#L46-L62
570[`CompletionContext`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion/completion_context.rs#L14-L37 570[`CompletionContext`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion/completion_context.rs#L14-L37
571["IntelliJ Trick"]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion/completion_context.rs#L72-L75 571["IntelliJ Trick"]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion/completion_context.rs#L72-L75
572[find an ancestor `fn` node]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion/completion_context.rs#L116-L120 572[find an ancestor `fn` node]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion/completion_context.rs#L116-L120
573[semantic model]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion/completion_context.rs#L123 573[semantic model]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion/completion_context.rs#L123
574[series of independent completion routines]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion.rs#L52-L59 574[series of independent completion routines]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion.rs#L52-L59
575[`complete_dot`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide_api/src/completion/complete_dot.rs#L6-L22 575[`complete_dot`]: https://github.com/rust-analyzer/rust-analyzer/blob/guide-2019-01/crates/ra_ide/src/completion/complete_dot.rs#L6-L22