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.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index ba24524f2..9da2eb014 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -80,7 +80,7 @@ In general, I use one of the following workflows for fixing bugs and
80implementing features. 80implementing features.
81 81
82If the problem concerns only internal parts of rust-analyzer (ie, I don't need 82If the problem concerns only internal parts of rust-analyzer (ie, I don't need
83to touch `ra_lsp_server` crate or typescript code), there is a unit-test for it. 83to touch `rust-analyzer` crate or typescript code), there is a unit-test for it.
84So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and 84So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and
85then just do printf-driven development/debugging. As a sanity check after I'm 85then just do printf-driven development/debugging. As a sanity check after I'm
86done, I use `cargo xtask install --server` and **Reload Window** action in VS 86done, I use `cargo xtask install --server` and **Reload Window** action in VS
@@ -88,17 +88,17 @@ Code to sanity check that the thing works as I expect.
88 88
89If the problem concerns only the VS Code extension, I use **Run Extension** 89If the problem concerns only the VS Code extension, I use **Run Extension**
90launch configuration from `launch.json`. Notably, this uses the usual 90launch configuration from `launch.json`. Notably, this uses the usual
91`ra_lsp_server` binary from `PATH`. For this it is important to have the following 91`rust-analyzer` binary from `PATH`. For this it is important to have the following
92in `setting.json` file: 92in `setting.json` file:
93```json 93```json
94{ 94{
95 "rust-analyzer.raLspServerPath": "ra_lsp_server" 95 "rust-analyzer.raLspServerPath": "rust-analyzer"
96} 96}
97``` 97```
98After I am done with the fix, I use `cargo 98After I am done with the fix, I use `cargo
99xtask install --client-code` to try the new extension for real. 99xtask install --client-code` to try the new extension for real.
100 100
101If I need to fix something in the `ra_lsp_server` crate, I feel sad because it's 101If I need to fix something in the `rust-analyzer` crate, I feel sad because it's
102on the boundary between the two processes, and working there is slow. I usually 102on the boundary between the two processes, and working there is slow. I usually
103just `cargo xtask install --server` and poke changes from my live environment. 103just `cargo xtask install --server` and poke changes from my live environment.
104Note that this uses `--release`, which is usually faster overall, because 104Note that this uses `--release`, which is usually faster overall, because
@@ -113,7 +113,7 @@ communication, and `print!` would break it.
113If I need to fix something simultaneously in the server and in the client, I 113If I need to fix something simultaneously in the server and in the client, I
114feel even more sad. I don't have a specific workflow for this case. 114feel even more sad. I don't have a specific workflow for this case.
115 115
116Additionally, I use `cargo run --release -p ra_lsp_server -- analysis-stats 116Additionally, I use `cargo run --release -p rust-analyzer -- analysis-stats
117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for 117path/to/some/rust/crate` to run a batch analysis. This is primarily useful for
118performance optimizations, or for bug minimization. 118performance optimizations, or for bug minimization.
119 119
@@ -148,7 +148,7 @@ There's also two VS Code commands which might be of interest:
148* `Rust Analyzer: Status` shows some memory-usage statistics. To take full 148* `Rust Analyzer: Status` shows some memory-usage statistics. To take full
149 advantage of it, you need to compile rust-analyzer with jemalloc support: 149 advantage of it, you need to compile rust-analyzer with jemalloc support:
150 ``` 150 ```
151 $ cargo install --path crates/ra_lsp_server --force --features jemalloc 151 $ cargo install --path crates/rust-analyzer --force --features jemalloc
152 ``` 152 ```
153 153
154 There's an alias for this: `cargo xtask install --server --jemalloc`. 154 There's an alias for this: `cargo xtask install --server --jemalloc`.
@@ -170,12 +170,12 @@ In particular, I have `export RA_PROFILE='*>10'` in my shell profile.
170To measure time for from-scratch analysis, use something like this: 170To measure time for from-scratch analysis, use something like this:
171 171
172``` 172```
173$ cargo run --release -p ra_lsp_server -- analysis-stats ../chalk/ 173$ cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
174``` 174```
175 175
176For measuring time of incremental analysis, use either of these: 176For measuring time of incremental analysis, use either of these:
177 177
178``` 178```
179$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs 179$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --highlight ../chalk/chalk-engine/src/logic.rs
180$ cargo run --release -p ra_lsp_server -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0 180$ cargo run --release -p rust-analyzer -- analysis-bench ../chalk/ --complete ../chalk/chalk-engine/src/logic.rs:94:0
181``` 181```