aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cargo/config14
-rw-r--r--Cargo.lock23
-rw-r--r--crates/ra_cli/Cargo.toml1
-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
3gen-syntax = "run --package tools --bin tools -- gen-syntax" 3gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax"
4# Extracts the tests from 4# Extracts the tests from
5gen-tests = "run --package tools --bin tools -- gen-tests" 5gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests"
6# Installs ra_lsp_server 6# Installs ra_lsp_server
7install-lsp = "install --path crates/ra_lsp_server --force" 7install-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
9jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" 9jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc"
10# Installs the visual studio code extension 10# Installs the visual studio code extension
11install-code = "run --package tools --bin tools -- install-code" 11install-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.
13format = "run --package tools --bin tools -- format" 13format = "run --package ra_tools --bin ra_tools -- format"
14format-hook = "run --package tools --bin tools -- format-hook" 14format-hook = "run --package ra_tools --bin ra_tools -- format-hook"
15# Run clippy 15# Run clippy
16lint = "run --package tools --bin tools -- lint" 16lint = "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)
19fuzz-tests = "run --package tools --bin tools -- fuzz-tests" 19fuzz-tests = "run --package ra_tools --bin ra_tools -- fuzz-tests"
20 20
21render-test = "run --package ra_cli -- render-test" 21render-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]]
1231name = "ra_tools"
1232version = "0.1.0"
1233dependencies = [
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]]
1232name = "ra_tt" 1242name = "ra_tt"
1233version = "0.1.0" 1243version = "0.1.0"
1234dependencies = [ 1244dependencies = [
@@ -1767,17 +1777,6 @@ dependencies = [
1767] 1777]
1768 1778
1769[[package]] 1779[[package]]
1770name = "tools"
1771version = "0.1.0"
1772dependencies = [
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]]
1781name = "typenum" 1780name = "typenum"
1782version = "1.10.0" 1781version = "1.10.0"
1783source = "registry+https://github.com/rust-lang/crates.io-index" 1782source = "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
15ra_syntax = { path = "../ra_syntax" } 15ra_syntax = { path = "../ra_syntax" }
16ra_ide_api = { path = "../ra_ide_api" } 16ra_ide_api = { path = "../ra_ide_api" }
17tools = { path = "../tools" }
18ra_batch = { path = "../ra_batch" } 17ra_batch = { path = "../ra_batch" }
19ra_hir = { path = "../ra_hir" } 18ra_hir = { path = "../ra_hir" }
20ra_db = { path = "../ra_db" } 19ra_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]
2edition = "2018" 2edition = "2018"
3name = "tools" 3name = "ra_tools"
4version = "0.1.0" 4version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6publish = false 6publish = 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
3use failure::bail; 3use failure::bail;
4 4
5use tools::{Result, run_rustfmt, run, project_root}; 5use ra_tools::{Result, run_rustfmt, run, project_root, Overwrite};
6 6
7fn main() -> tools::Result<()> { 7fn 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 @@
1use clap::{App, SubCommand}; 1use clap::{App, SubCommand};
2use core::str; 2use core::str;
3use failure::bail; 3use failure::bail;
4use tools::{ 4use 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 @@
1use walkdir::WalkDir; 1use walkdir::WalkDir;
2 2
3use tools::{generate, gen_tests, run_rustfmt, Verify, project_root}; 3use ra_tools::{generate, gen_tests, run_rustfmt, Verify, project_root};
4 4
5#[test] 5#[test]
6fn generated_grammar_is_fresh() { 6fn generated_grammar_is_fresh() {