aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cargo/config2
-rw-r--r--Cargo.lock7
-rw-r--r--Cargo.toml2
-rw-r--r--crates/ra_syntax/src/grammar.ron2
-rw-r--r--docs/dev/README.md10
-rw-r--r--docs/dev/architecture.md2
-rw-r--r--xtask/src/bin/pre-commit.rs2
-rw-r--r--xtask/src/lib.rs2
-rw-r--r--xtask/tests/tidy-tests/cli.rs (renamed from xtask/tests/cli.rs)6
-rw-r--r--xtask/tests/tidy-tests/docs.rs (renamed from xtask/tests/docs.rs)2
-rw-r--r--xtask/tests/tidy-tests/main.rs (renamed from xtask/tests/main.rs)0
11 files changed, 15 insertions, 22 deletions
diff --git a/.cargo/config b/.cargo/config
index 67d0d1885..3812e1e2d 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -1,4 +1,4 @@
1[alias] 1[alias]
2xtask = "run --package xtask --bin xtask --" 2xtask = "run --package xtask --bin xtask --"
3 3
4install-ra = "run --package xtask -- install" # for backwards compat 4install-ra = "run --package xtask --bin xtask -- install" # for backwards compat
diff --git a/Cargo.lock b/Cargo.lock
index d2fe8e216..ea6521333 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1719,13 +1719,6 @@ version = "0.7.0"
1719source = "registry+https://github.com/rust-lang/crates.io-index" 1719source = "registry+https://github.com/rust-lang/crates.io-index"
1720 1720
1721[[package]] 1721[[package]]
1722name = "website-gen"
1723version = "0.0.0"
1724dependencies = [
1725 "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
1726]
1727
1728[[package]]
1729name = "winapi" 1722name = "winapi"
1730version = "0.2.8" 1723version = "0.2.8"
1731source = "registry+https://github.com/rust-lang/crates.io-index" 1724source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index e8f6c4267..97c02b40f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
1[workspace] 1[workspace]
2members = [ "crates/*", "xtask/", "website/website-gen" ] 2members = [ "crates/*", "xtask/" ]
3 3
4[profile.dev] 4[profile.dev]
5debug = 1 # only line info 5debug = 1 # only line info
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 25e6f64ce..0a8fd0612 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -1,5 +1,5 @@
1// Stores definitions which must be used in multiple places 1// Stores definitions which must be used in multiple places
2// See `cargo gen-syntax` (defined in crates/ra_tools/src/main.rs) 2// See `cargo xtask codegen` (defined in xtasks/src/main.rs)
3Grammar( 3Grammar(
4 punct: [ 4 punct: [
5 (";", "SEMI"), 5 (";", "SEMI"),
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 5e18e4ffe..e5a7ea5f6 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -65,8 +65,8 @@ integrating with editors. Currently, it contains plugins for VS Code (in
65typescript) and Emacs (in elisp). The `docs` top-level directory contains both 65typescript) and Emacs (in elisp). The `docs` top-level directory contains both
66developer and user documentation. 66developer and user documentation.
67 67
68We have some automation infra in Rust in the `crates/tool` package. It contains 68We have some automation infra in Rust in the `xtask` package. It contains
69stuff like formatting checking, code generation and powers `cargo install-ra`. 69stuff like formatting checking, code generation and powers `cargo xtask install`.
70The latter syntax is achieved with the help of cargo aliases (see `.cargo` 70The latter syntax is achieved with the help of cargo aliases (see `.cargo`
71directory). 71directory).
72 72
@@ -84,7 +84,7 @@ However, launching a VS Code instance with locally build language server is
84possible. There's even a VS Code task for this, so just <kbd>F5</kbd> should 84possible. There's even a VS Code task for this, so just <kbd>F5</kbd> should
85work (thanks, [@andrew-w-ross](https://github.com/andrew-w-ross)!). 85work (thanks, [@andrew-w-ross](https://github.com/andrew-w-ross)!).
86 86
87I often just install development version with `cargo install-ra --server --jemalloc` and 87I often just install development version with `cargo xtask install --server --jemalloc` and
88restart the host VS Code. 88restart the host VS Code.
89 89
90See [./debugging.md](./debugging.md) for how to attach to rust-analyzer with 90See [./debugging.md](./debugging.md) for how to attach to rust-analyzer with
@@ -116,7 +116,7 @@ Due to the requirements of running the tests inside VS Code they are **not run
116on CI**. When making changes to the extension please ensure the tests are not 116on CI**. When making changes to the extension please ensure the tests are not
117broken locally before opening a Pull Request. 117broken locally before opening a Pull Request.
118 118
119To install **only** the VS Code extension, use `cargo install-ra --client-code`. 119To install **only** the VS Code extension, use `cargo xtask install --client-code`.
120 120
121# Logging 121# Logging
122 122
@@ -153,7 +153,7 @@ There's also two VS Code commands which might be of interest:
153 $ cargo install --path crates/ra_lsp_server --force --features jemalloc 153 $ cargo install --path crates/ra_lsp_server --force --features jemalloc
154 ``` 154 ```
155 155
156 There's an alias for this: `cargo install-ra --server --jemalloc`. 156 There's an alias for this: `cargo xtask install --server --jemalloc`.
157 157
158* `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection. 158* `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection.
159 159
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 28f2a37e5..5ec5352e7 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -71,7 +71,7 @@ Rust syntax tree structure and parser. See
71 This is the thing that turns a flat list of events into a tree (see `EventProcessor`) 71 This is the thing that turns a flat list of events into a tree (see `EventProcessor`)
72- `ast` provides a type safe API on top of the raw `rowan` tree. 72- `ast` provides a type safe API on top of the raw `rowan` tree.
73- `grammar.ron` RON description of the grammar, which is used to 73- `grammar.ron` RON description of the grammar, which is used to
74 generate `syntax_kinds` and `ast` modules, using `cargo gen-syntax` command. 74 generate `syntax_kinds` and `ast` modules, using `cargo xtask codegen` command.
75- `algo`: generic tree algorithms, including `walk` for O(1) stack 75- `algo`: generic tree algorithms, including `walk` for O(1) stack
76 space tree traversal (this is cool). 76 space tree traversal (this is cool).
77 77
diff --git a/xtask/src/bin/pre-commit.rs b/xtask/src/bin/pre-commit.rs
index 16bbf9cb2..4ee864756 100644
--- a/xtask/src/bin/pre-commit.rs
+++ b/xtask/src/bin/pre-commit.rs
@@ -2,7 +2,7 @@
2 2
3use std::process::Command; 3use std::process::Command;
4 4
5use ra_tools::{project_root, run, run_rustfmt, Overwrite, Result}; 5use xtask::{project_root, run, run_rustfmt, Overwrite, Result};
6 6
7fn main() -> Result<()> { 7fn main() -> Result<()> {
8 run_rustfmt(Overwrite)?; 8 run_rustfmt(Overwrite)?;
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 761592e85..a8685f567 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -146,7 +146,7 @@ pub fn install_format_hook() -> Result<()> {
146 "./.git/hooks/pre-commit" 146 "./.git/hooks/pre-commit"
147 }); 147 });
148 if !result_path.exists() { 148 if !result_path.exists() {
149 run("cargo build --package ra_tools --bin pre-commit", ".")?; 149 run("cargo build --package xtask --bin pre-commit", ".")?;
150 if cfg!(windows) { 150 if cfg!(windows) {
151 fs::copy("./target/debug/pre-commit.exe", result_path)?; 151 fs::copy("./target/debug/pre-commit.exe", result_path)?;
152 } else { 152 } else {
diff --git a/xtask/tests/cli.rs b/xtask/tests/tidy-tests/cli.rs
index 609fd4d8b..5d8ddea83 100644
--- a/xtask/tests/cli.rs
+++ b/xtask/tests/tidy-tests/cli.rs
@@ -1,17 +1,17 @@
1use ra_tools::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify};
2use walkdir::WalkDir; 1use walkdir::WalkDir;
2use xtask::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify};
3 3
4#[test] 4#[test]
5fn generated_grammar_is_fresh() { 5fn generated_grammar_is_fresh() {
6 if let Err(error) = generate_boilerplate(Verify) { 6 if let Err(error) = generate_boilerplate(Verify) {
7 panic!("{}. Please update it by running `cargo gen-syntax`", error); 7 panic!("{}. Please update it by running `cargo xtask codegen`", error);
8 } 8 }
9} 9}
10 10
11#[test] 11#[test]
12fn generated_tests_are_fresh() { 12fn generated_tests_are_fresh() {
13 if let Err(error) = gen_tests(Verify) { 13 if let Err(error) = gen_tests(Verify) {
14 panic!("{}. Please update tests by running `cargo gen-tests`", error); 14 panic!("{}. Please update tests by running `cargo xtask gen-tests`", error);
15 } 15 }
16} 16}
17 17
diff --git a/xtask/tests/docs.rs b/xtask/tests/tidy-tests/docs.rs
index ea3330175..fe5852bc6 100644
--- a/xtask/tests/docs.rs
+++ b/xtask/tests/tidy-tests/docs.rs
@@ -5,7 +5,7 @@ use std::path::Path;
5 5
6use walkdir::{DirEntry, WalkDir}; 6use walkdir::{DirEntry, WalkDir};
7 7
8use ra_tools::project_root; 8use xtask::project_root;
9 9
10fn is_exclude_dir(p: &Path) -> bool { 10fn is_exclude_dir(p: &Path) -> bool {
11 let exclude_dirs = ["tests", "test_data"]; 11 let exclude_dirs = ["tests", "test_data"];
diff --git a/xtask/tests/main.rs b/xtask/tests/tidy-tests/main.rs
index 56d1318d6..56d1318d6 100644
--- a/xtask/tests/main.rs
+++ b/xtask/tests/tidy-tests/main.rs