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]
# 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
gen-tests = "run --package tools --bin tools -- gen-tests"
gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests"
# Installs ra_lsp_server
install-lsp = "install --path crates/ra_lsp_server --force"
# Installs ra_lsp_server with the jemalloc feature
jinstall-lsp = "install --path crates/ra_lsp_server --force --features jemalloc"
# 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.
format = "run --package tools --bin tools -- format"
format-hook = "run --package tools --bin tools -- format-hook"
format = "run --package ra_tools --bin ra_tools -- format"
format-hook = "run --package ra_tools --bin ra_tools -- format-hook"
# 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)
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"
# 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_prof 0.1.0",
"ra_syntax 0.1.0",
"tools 0.1.0",
]
[[package]]
@ -1227,6 +1226,17 @@ dependencies = [
"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]]
name = "ra_tt"
version = "0.1.0"
@ -1765,17 +1775,6 @@ dependencies = [
"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]]
name = "typenum"
version = "1.10.0"

View file

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

View file

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

View file

@ -2,10 +2,10 @@ use std::process::Command;
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<()> {
run_rustfmt(tools::Overwrite)?;
fn main() -> Result<()> {
run_rustfmt(Overwrite)?;
update_staged()
}

View file

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

View file

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

View file

@ -1,6 +1,6 @@
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]
fn generated_grammar_is_fresh() {