diff options
-rw-r--r-- | .cargo/config | 14 | ||||
-rw-r--r-- | Cargo.lock | 23 | ||||
-rw-r--r-- | crates/ra_cli/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_tools/Cargo.toml (renamed from crates/tools/Cargo.toml) | 2 | ||||
-rw-r--r-- | crates/ra_tools/src/bin/pre-commit.rs (renamed from crates/tools/src/bin/pre-commit.rs) | 6 | ||||
-rw-r--r-- | crates/ra_tools/src/lib.rs (renamed from crates/tools/src/lib.rs) | 2 | ||||
-rw-r--r-- | crates/ra_tools/src/main.rs (renamed from crates/tools/src/main.rs) | 2 | ||||
-rw-r--r-- | crates/ra_tools/tests/cli.rs (renamed from crates/tools/tests/cli.rs) | 2 |
8 files changed, 25 insertions, 27 deletions
diff --git a/.cargo/config b/.cargo/config index 51ae33910..3ac2ce336 100644 --- a/.cargo/config +++ b/.cargo/config | |||
@@ -1,22 +1,22 @@ | |||
1 | [alias] | 1 | [alias] |
2 | # Automatically generates the ast and syntax kinds files | 2 | # Automatically generates the ast and syntax kinds files |
3 | gen-syntax = "run --package tools --bin tools -- gen-syntax" | 3 | gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax" |
4 | # Extracts the tests from | 4 | # Extracts the tests from |
5 | gen-tests = "run --package tools --bin tools -- gen-tests" | 5 | gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests" |
6 | # Installs ra_lsp_server | 6 | # Installs ra_lsp_server |
7 | install-lsp = "install --path crates/ra_lsp_server --force" | 7 | install-lsp = "install --path crates/ra_lsp_server --force" |
8 | # Installs ra_lsp_server with the jemalloc feature | 8 | # Installs ra_lsp_server with the jemalloc feature |
9 | jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" | 9 | jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" |
10 | # Installs the visual studio code extension | 10 | # Installs the visual studio code extension |
11 | install-code = "run --package tools --bin tools -- install-code" | 11 | install-code = "run --package ra_tools --bin ra_tools -- install-code" |
12 | # Formats the full repository or installs the git hook to do it automatically. | 12 | # Formats the full repository or installs the git hook to do it automatically. |
13 | format = "run --package tools --bin tools -- format" | 13 | format = "run --package ra_tools --bin ra_tools -- format" |
14 | format-hook = "run --package tools --bin tools -- format-hook" | 14 | format-hook = "run --package ra_tools --bin ra_tools -- format-hook" |
15 | # Run clippy | 15 | # Run clippy |
16 | lint = "run --package tools --bin tools -- lint" | 16 | lint = "run --package ra_tools --bin ra_tools -- lint" |
17 | 17 | ||
18 | # Runs the fuzzing test suite (currently only parser) | 18 | # Runs the fuzzing test suite (currently only parser) |
19 | fuzz-tests = "run --package tools --bin tools -- fuzz-tests" | 19 | fuzz-tests = "run --package ra_tools --bin ra_tools -- fuzz-tests" |
20 | 20 | ||
21 | render-test = "run --package ra_cli -- render-test" | 21 | render-test = "run --package ra_cli -- render-test" |
22 | # Parse a file. This should be piped the file contents | 22 | # Parse a file. This should be piped the file contents |
diff --git a/Cargo.lock b/Cargo.lock index 4fccddc5a..c19b87b61 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -1047,7 +1047,6 @@ dependencies = [ | |||
1047 | "ra_ide_api 0.1.0", | 1047 | "ra_ide_api 0.1.0", |
1048 | "ra_prof 0.1.0", | 1048 | "ra_prof 0.1.0", |
1049 | "ra_syntax 0.1.0", | 1049 | "ra_syntax 0.1.0", |
1050 | "tools 0.1.0", | ||
1051 | ] | 1050 | ] |
1052 | 1051 | ||
1053 | [[package]] | 1052 | [[package]] |
@@ -1229,6 +1228,17 @@ dependencies = [ | |||
1229 | ] | 1228 | ] |
1230 | 1229 | ||
1231 | [[package]] | 1230 | [[package]] |
1231 | name = "ra_tools" | ||
1232 | version = "0.1.0" | ||
1233 | dependencies = [ | ||
1234 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1235 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1236 | "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1237 | "teraron 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1238 | "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1239 | ] | ||
1240 | |||
1241 | [[package]] | ||
1232 | name = "ra_tt" | 1242 | name = "ra_tt" |
1233 | version = "0.1.0" | 1243 | version = "0.1.0" |
1234 | dependencies = [ | 1244 | dependencies = [ |
@@ -1767,17 +1777,6 @@ dependencies = [ | |||
1767 | ] | 1777 | ] |
1768 | 1778 | ||
1769 | [[package]] | 1779 | [[package]] |
1770 | name = "tools" | ||
1771 | version = "0.1.0" | ||
1772 | dependencies = [ | ||
1773 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1774 | "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1775 | "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1776 | "teraron 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1777 | "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1778 | ] | ||
1779 | |||
1780 | [[package]] | ||
1781 | name = "typenum" | 1780 | name = "typenum" |
1782 | version = "1.10.0" | 1781 | version = "1.10.0" |
1783 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1782 | source = "registry+https://github.com/rust-lang/crates.io-index" |
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index 328b2436f..3117f4fda 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml | |||
@@ -14,7 +14,6 @@ indicatif = "0.11.0" | |||
14 | 14 | ||
15 | ra_syntax = { path = "../ra_syntax" } | 15 | ra_syntax = { path = "../ra_syntax" } |
16 | ra_ide_api = { path = "../ra_ide_api" } | 16 | ra_ide_api = { path = "../ra_ide_api" } |
17 | tools = { path = "../tools" } | ||
18 | ra_batch = { path = "../ra_batch" } | 17 | ra_batch = { path = "../ra_batch" } |
19 | ra_hir = { path = "../ra_hir" } | 18 | ra_hir = { path = "../ra_hir" } |
20 | ra_db = { path = "../ra_db" } | 19 | ra_db = { path = "../ra_db" } |
diff --git a/crates/tools/Cargo.toml b/crates/ra_tools/Cargo.toml index f03256a74..35ea3231b 100644 --- a/crates/tools/Cargo.toml +++ b/crates/ra_tools/Cargo.toml | |||
@@ -1,6 +1,6 @@ | |||
1 | [package] | 1 | [package] |
2 | edition = "2018" | 2 | edition = "2018" |
3 | name = "tools" | 3 | name = "ra_tools" |
4 | version = "0.1.0" | 4 | version = "0.1.0" |
5 | authors = ["rust-analyzer developers"] | 5 | authors = ["rust-analyzer developers"] |
6 | publish = false | 6 | publish = false |
diff --git a/crates/tools/src/bin/pre-commit.rs b/crates/ra_tools/src/bin/pre-commit.rs index ea18c0863..c514e992b 100644 --- a/crates/tools/src/bin/pre-commit.rs +++ b/crates/ra_tools/src/bin/pre-commit.rs | |||
@@ -2,10 +2,10 @@ use std::process::Command; | |||
2 | 2 | ||
3 | use failure::bail; | 3 | use failure::bail; |
4 | 4 | ||
5 | use tools::{Result, run_rustfmt, run, project_root}; | 5 | use ra_tools::{Result, run_rustfmt, run, project_root, Overwrite}; |
6 | 6 | ||
7 | fn main() -> tools::Result<()> { | 7 | fn main() -> Result<()> { |
8 | run_rustfmt(tools::Overwrite)?; | 8 | run_rustfmt(Overwrite)?; |
9 | update_staged() | 9 | update_staged() |
10 | } | 10 | } |
11 | 11 | ||
diff --git a/crates/tools/src/lib.rs b/crates/ra_tools/src/lib.rs index 2446fdf28..61f6b08cd 100644 --- a/crates/tools/src/lib.rs +++ b/crates/ra_tools/src/lib.rs | |||
@@ -121,7 +121,7 @@ pub fn install_format_hook() -> Result<()> { | |||
121 | "./.git/hooks/pre-commit" | 121 | "./.git/hooks/pre-commit" |
122 | }); | 122 | }); |
123 | if !result_path.exists() { | 123 | if !result_path.exists() { |
124 | run("cargo build --package tools --bin pre-commit", ".")?; | 124 | run("cargo build --package ra_tools --bin pre-commit", ".")?; |
125 | if cfg!(windows) { | 125 | if cfg!(windows) { |
126 | fs::copy("./target/debug/pre-commit.exe", result_path)?; | 126 | fs::copy("./target/debug/pre-commit.exe", result_path)?; |
127 | } else { | 127 | } else { |
diff --git a/crates/tools/src/main.rs b/crates/ra_tools/src/main.rs index 8027ff833..285071ea5 100644 --- a/crates/tools/src/main.rs +++ b/crates/ra_tools/src/main.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use clap::{App, SubCommand}; | 1 | use clap::{App, SubCommand}; |
2 | use core::str; | 2 | use core::str; |
3 | use failure::bail; | 3 | use failure::bail; |
4 | use tools::{ | 4 | use ra_tools::{ |
5 | generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt, | 5 | generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt, |
6 | Overwrite, Result, run_fuzzer, run_clippy, | 6 | Overwrite, Result, run_fuzzer, run_clippy, |
7 | }; | 7 | }; |
diff --git a/crates/tools/tests/cli.rs b/crates/ra_tools/tests/cli.rs index 6f82ae61d..83640218f 100644 --- a/crates/tools/tests/cli.rs +++ b/crates/ra_tools/tests/cli.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use walkdir::WalkDir; | 1 | use walkdir::WalkDir; |
2 | 2 | ||
3 | use tools::{generate, gen_tests, run_rustfmt, Verify, project_root}; | 3 | use ra_tools::{generate, gen_tests, run_rustfmt, Verify, project_root}; |
4 | 4 | ||
5 | #[test] | 5 | #[test] |
6 | fn generated_grammar_is_fresh() { | 6 | fn generated_grammar_is_fresh() { |