aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/README.md')
-rw-r--r--docs/dev/README.md25
1 files changed, 15 insertions, 10 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 67813a9c0..36edddc70 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/ 17https://rust-analyzer.github.io/rust-analyzer/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
@@ -92,11 +92,11 @@ This is primarily useful for performance optimizations, or for bug minimization.
92 92
93## Parser Tests 93## Parser Tests
94 94
95Tests for the parser (`ra_parser`) live in the `ra_syntax` crate (see `test_data` directory). 95Tests for the parser (`parser`) live in the `syntax` crate (see `test_data` directory).
96There are two kinds of tests: 96There are two kinds of tests:
97 97
98* Manually written test cases in `parser/ok` and `parser/err` 98* Manually written test cases in `parser/ok` and `parser/err`
99* "Inline" tests in `parser/inline` (these are generated) from comments in `ra_parser` crate. 99* "Inline" tests in `parser/inline` (these are generated) from comments in `parser` crate.
100 100
101The purpose of inline tests is not to achieve full coverage by test cases, but to explain to the reader of the code what each particular `if` and `match` is responsible for. 101The purpose of inline tests is not to achieve full coverage by test cases, but to explain to the reader of the code what each particular `if` and `match` is responsible for.
102If you are tempted to add a large inline test, it might be a good idea to leave only the simplest example in place, and move the test to a manual `parser/ok` test. 102If you are tempted to add a large inline test, it might be a good idea to leave only the simplest example in place, and move the test to a manual `parser/ok` test.
@@ -148,23 +148,28 @@ Internal representations are lowered to LSP in the `rust-analyzer` crate (the on
148 148
149## IDE/Compiler split 149## IDE/Compiler split
150 150
151There's a semi-hard split between "compiler" and "IDE", at the `ra_hir` crate. 151There's a semi-hard split between "compiler" and "IDE", at the `hir` crate.
152Compiler derives new facts about source code. 152Compiler derives new facts about source code.
153It explicitly acknowledges that not all info is available (i.e. you can't look at types during name resolution). 153It explicitly acknowledges that not all info is available (i.e. you can't look at types during name resolution).
154 154
155IDE assumes that all information is available at all times. 155IDE assumes that all information is available at all times.
156 156
157IDE should use only types from `ra_hir`, and should not depend on the underling compiler types. 157IDE should use only types from `hir`, and should not depend on the underling compiler types.
158`ra_hir` is a facade. 158`hir` is a facade.
159 159
160## IDE API 160## IDE API
161 161
162The main IDE crate (`ra_ide`) uses "Plain Old Data" for the API. 162The main IDE crate (`ide`) uses "Plain Old Data" for the API.
163Rather than talking in definitions and references, it talks in Strings and textual offsets. 163Rather than talking in definitions and references, it talks in Strings and textual offsets.
164In general, API is centered around UI concerns -- the result of the call is what the user sees in the editor, and not what the compiler sees underneath. 164In general, API is centered around UI concerns -- the result of the call is what the user sees in the editor, and not what the compiler sees underneath.
165The results are 100% Rust specific though. 165The results are 100% Rust specific though.
166Shout outs to LSP developers for popularizing the idea that "UI" is a good place to draw a boundary at. 166Shout outs to LSP developers for popularizing the idea that "UI" is a good place to draw a boundary at.
167 167
168## CI
169
170CI does not test rust-analyzer, CI is a core part of rust-analyzer, and is maintained with above average standard of quality.
171CI is reproducible -- it can only be broken by changes to files in this repository, any dependence on externalities is a bug.
172
168# Code Style & Review Process 173# Code Style & Review Process
169 174
170Do see [./style.md](./style.md). 175Do see [./style.md](./style.md).
@@ -256,9 +261,9 @@ Release steps:
256 * checkout the `release` branch 261 * checkout the `release` branch
257 * reset it to `upstream/nightly` 262 * reset it to `upstream/nightly`
258 * push it to `upstream`. This triggers GitHub Actions which: 263 * push it to `upstream`. This triggers GitHub Actions which:
259 ** runs `cargo xtask dist` to package binaries and VS Code extension 264 * runs `cargo xtask dist` to package binaries and VS Code extension
260 ** makes a GitHub release 265 * makes a GitHub release
261 ** pushes VS Code extension to the marketplace 266 * pushes VS Code extension to the marketplace
262 * create new changelog in `rust-analyzer.github.io` 267 * create new changelog in `rust-analyzer.github.io`
263 * create `rust-analyzer.github.io/git.log` file with the log of merge commits since last release 268 * create `rust-analyzer.github.io/git.log` file with the log of merge commits since last release
2642. While the release is in progress, fill-in the changelog using `git.log` 2692. While the release is in progress, fill-in the changelog using `git.log`