diff options
author | Aleksey Kladov <[email protected]> | 2020-02-18 11:33:16 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-18 11:33:16 +0000 |
commit | c0fa5e2246457df10e92c2e11c971f2f40921793 (patch) | |
tree | 323d890c830b14c222113fa8617070c3b1fde3d2 /docs/dev/README.md | |
parent | 4d307ff8024c8d2d533bc3ab7aac1d63ca5c5977 (diff) |
Rename the binary to rust-analyzer
Diffstat (limited to 'docs/dev/README.md')
-rw-r--r-- | docs/dev/README.md | 18 |
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 | |||
80 | implementing features. | 80 | implementing features. |
81 | 81 | ||
82 | If the problem concerns only internal parts of rust-analyzer (ie, I don't need | 82 | If the problem concerns only internal parts of rust-analyzer (ie, I don't need |
83 | to touch `ra_lsp_server` crate or typescript code), there is a unit-test for it. | 83 | to touch `rust-analyzer` crate or typescript code), there is a unit-test for it. |
84 | So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and | 84 | So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and |
85 | then just do printf-driven development/debugging. As a sanity check after I'm | 85 | then just do printf-driven development/debugging. As a sanity check after I'm |
86 | done, I use `cargo xtask install --server` and **Reload Window** action in VS | 86 | done, 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 | ||
89 | If the problem concerns only the VS Code extension, I use **Run Extension** | 89 | If the problem concerns only the VS Code extension, I use **Run Extension** |
90 | launch configuration from `launch.json`. Notably, this uses the usual | 90 | launch 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 |
92 | in `setting.json` file: | 92 | in `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 | ``` |
98 | After I am done with the fix, I use `cargo | 98 | After I am done with the fix, I use `cargo |
99 | xtask install --client-code` to try the new extension for real. | 99 | xtask install --client-code` to try the new extension for real. |
100 | 100 | ||
101 | If I need to fix something in the `ra_lsp_server` crate, I feel sad because it's | 101 | If I need to fix something in the `rust-analyzer` crate, I feel sad because it's |
102 | on the boundary between the two processes, and working there is slow. I usually | 102 | on the boundary between the two processes, and working there is slow. I usually |
103 | just `cargo xtask install --server` and poke changes from my live environment. | 103 | just `cargo xtask install --server` and poke changes from my live environment. |
104 | Note that this uses `--release`, which is usually faster overall, because | 104 | Note that this uses `--release`, which is usually faster overall, because |
@@ -113,7 +113,7 @@ communication, and `print!` would break it. | |||
113 | If I need to fix something simultaneously in the server and in the client, I | 113 | If I need to fix something simultaneously in the server and in the client, I |
114 | feel even more sad. I don't have a specific workflow for this case. | 114 | feel even more sad. I don't have a specific workflow for this case. |
115 | 115 | ||
116 | Additionally, I use `cargo run --release -p ra_lsp_server -- analysis-stats | 116 | Additionally, I use `cargo run --release -p rust-analyzer -- analysis-stats |
117 | path/to/some/rust/crate` to run a batch analysis. This is primarily useful for | 117 | path/to/some/rust/crate` to run a batch analysis. This is primarily useful for |
118 | performance optimizations, or for bug minimization. | 118 | performance 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. | |||
170 | To measure time for from-scratch analysis, use something like this: | 170 | To 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 | ||
176 | For measuring time of incremental analysis, use either of these: | 176 | For 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 | ``` |