1391: rename tools -> ra_tools r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-06-10 22:49:51 +00:00
commit 3f5f9f0560
8 changed files with 25 additions and 27 deletions

View File

@ -1,22 +1,22 @@
[alias] [alias]
# Automatically generates the ast and syntax kinds files # Automatically generates the ast and syntax kinds files
gen-syntax = "run --package tools --bin tools -- gen-syntax" gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax"
# Extracts the tests from # Extracts the tests from
gen-tests = "run --package tools --bin tools -- gen-tests" gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests"
# Installs ra_lsp_server # Installs ra_lsp_server
install-lsp = "install --path crates/ra_lsp_server --force" install-lsp = "install --path crates/ra_lsp_server --force"
# Installs ra_lsp_server with the jemalloc feature # Installs ra_lsp_server with the jemalloc feature
jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc" jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc"
# Installs the visual studio code extension # Installs the visual studio code extension
install-code = "run --package tools --bin tools -- install-code" install-code = "run --package ra_tools --bin ra_tools -- install-code"
# Formats the full repository or installs the git hook to do it automatically. # Formats the full repository or installs the git hook to do it automatically.
format = "run --package tools --bin tools -- format" format = "run --package ra_tools --bin ra_tools -- format"
format-hook = "run --package tools --bin tools -- format-hook" format-hook = "run --package ra_tools --bin ra_tools -- format-hook"
# Run clippy # Run clippy
lint = "run --package tools --bin tools -- lint" lint = "run --package ra_tools --bin ra_tools -- lint"
# Runs the fuzzing test suite (currently only parser) # Runs the fuzzing test suite (currently only parser)
fuzz-tests = "run --package tools --bin tools -- fuzz-tests" fuzz-tests = "run --package ra_tools --bin ra_tools -- fuzz-tests"
render-test = "run --package ra_cli -- render-test" render-test = "run --package ra_cli -- render-test"
# Parse a file. This should be piped the file contents # Parse a file. This should be piped the file contents

23
Cargo.lock generated
View File

@ -1047,7 +1047,6 @@ dependencies = [
"ra_ide_api 0.1.0", "ra_ide_api 0.1.0",
"ra_prof 0.1.0", "ra_prof 0.1.0",
"ra_syntax 0.1.0", "ra_syntax 0.1.0",
"tools 0.1.0",
] ]
[[package]] [[package]]
@ -1227,6 +1226,17 @@ dependencies = [
"text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "ra_tools"
version = "0.1.0"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"teraron 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "ra_tt" name = "ra_tt"
version = "0.1.0" version = "0.1.0"
@ -1765,17 +1775,6 @@ dependencies = [
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "tools"
version = "0.1.0"
dependencies = [
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"teraron 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.10.0" version = "1.10.0"

View File

@ -14,7 +14,6 @@ indicatif = "0.11.0"
ra_syntax = { path = "../ra_syntax" } ra_syntax = { path = "../ra_syntax" }
ra_ide_api = { path = "../ra_ide_api" } ra_ide_api = { path = "../ra_ide_api" }
tools = { path = "../tools" }
ra_batch = { path = "../ra_batch" } ra_batch = { path = "../ra_batch" }
ra_hir = { path = "../ra_hir" } ra_hir = { path = "../ra_hir" }
ra_db = { path = "../ra_db" } ra_db = { path = "../ra_db" }

View File

@ -1,6 +1,6 @@
[package] [package]
edition = "2018" edition = "2018"
name = "tools" name = "ra_tools"
version = "0.1.0" version = "0.1.0"
authors = ["rust-analyzer developers"] authors = ["rust-analyzer developers"]
publish = false publish = false

View File

@ -2,10 +2,10 @@
use failure::bail; use failure::bail;
use tools::{Result, run_rustfmt, run, project_root}; use ra_tools::{Result, run_rustfmt, run, project_root, Overwrite};
fn main() -> tools::Result<()> { fn main() -> Result<()> {
run_rustfmt(tools::Overwrite)?; run_rustfmt(Overwrite)?;
update_staged() update_staged()
} }

View File

@ -121,7 +121,7 @@ pub fn install_format_hook() -> Result<()> {
"./.git/hooks/pre-commit" "./.git/hooks/pre-commit"
}); });
if !result_path.exists() { if !result_path.exists() {
run("cargo build --package tools --bin pre-commit", ".")?; run("cargo build --package ra_tools --bin pre-commit", ".")?;
if cfg!(windows) { if cfg!(windows) {
fs::copy("./target/debug/pre-commit.exe", result_path)?; fs::copy("./target/debug/pre-commit.exe", result_path)?;
} else { } else {

View File

@ -1,7 +1,7 @@
use clap::{App, SubCommand}; use clap::{App, SubCommand};
use core::str; use core::str;
use failure::bail; use failure::bail;
use tools::{ use ra_tools::{
generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt, generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt,
Overwrite, Result, run_fuzzer, run_clippy, Overwrite, Result, run_fuzzer, run_clippy,
}; };

View File

@ -1,6 +1,6 @@
use walkdir::WalkDir; use walkdir::WalkDir;
use tools::{generate, gen_tests, run_rustfmt, Verify, project_root}; use ra_tools::{generate, gen_tests, run_rustfmt, Verify, project_root};
#[test] #[test]
fn generated_grammar_is_fresh() { fn generated_grammar_is_fresh() {