From c0fa5e2246457df10e92c2e11c971f2f40921793 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Feb 2020 12:33:16 +0100 Subject: Rename the binary to rust-analyzer --- crates/ra_db/src/input.rs | 2 +- crates/ra_ide_db/src/feature_flags.rs | 2 +- crates/ra_lsp_server/Cargo.toml | 4 ++-- crates/ra_lsp_server/src/bin/args.rs | 16 ++++++++-------- crates/ra_lsp_server/src/bin/main.rs | 6 +++--- crates/ra_lsp_server/src/main_loop.rs | 2 +- crates/ra_lsp_server/tests/heavy_tests/main.rs | 2 +- crates/ra_lsp_server/tests/heavy_tests/support.rs | 2 +- crates/ra_prof/src/lib.rs | 4 ++-- crates/ra_syntax/Cargo.toml | 2 +- crates/ra_tt/Cargo.toml | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) (limited to 'crates') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 1f1dcea42..1b4b47215 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -3,7 +3,7 @@ //! derived from this input. //! //! Note that neither this module, nor any other part of the analyzer's core do -//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how +//! actual IO. See `vfs` and `project_model` in the `rust-analyzer` crate for how //! actual IO is done and lowered to input. use std::{fmt, str::FromStr}; diff --git a/crates/ra_ide_db/src/feature_flags.rs b/crates/ra_ide_db/src/feature_flags.rs index 1b3cabf4d..76655f572 100644 --- a/crates/ra_ide_db/src/feature_flags.rs +++ b/crates/ra_ide_db/src/feature_flags.rs @@ -13,7 +13,7 @@ use rustc_hash::FxHashMap; /// checked at compile time, to keep things simple and flexible. /// /// Also note that, at the moment, `FeatureFlags` also store features for -/// `ra_lsp_server`. This should be benign layering violation. +/// `rust-analyzer`. This should be benign layering violation. #[derive(Debug)] pub struct FeatureFlags { flags: FxHashMap, diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml index 151ca3da5..3dae43d2a 100644 --- a/crates/ra_lsp_server/Cargo.toml +++ b/crates/ra_lsp_server/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2018" -name = "ra_lsp_server" +name = "rust-analyzer" version = "0.1.0" authors = ["rust-analyzer developers"] autobins = false @@ -9,7 +9,7 @@ autobins = false doctest = false [[bin]] -name = "ra_lsp_server" +name = "rust-analyzer" path = "./src/bin/main.rs" [dependencies] diff --git a/crates/ra_lsp_server/src/bin/args.rs b/crates/ra_lsp_server/src/bin/args.rs index 3890fe13a..5ad3963a2 100644 --- a/crates/ra_lsp_server/src/bin/args.rs +++ b/crates/ra_lsp_server/src/bin/args.rs @@ -5,7 +5,7 @@ use anyhow::{bail, Result}; use pico_args::Arguments; -use ra_lsp_server::cli::{BenchWhat, Position, Verbosity}; +use rust_analyzer::cli::{BenchWhat, Position, Verbosity}; use std::{fmt::Write, path::PathBuf}; @@ -74,7 +74,7 @@ impl Args { ra-cli-parse USAGE: - ra_lsp_server parse [FLAGS] + rust-analyzer parse [FLAGS] FLAGS: -h, --help Prints help inforamtion @@ -94,7 +94,7 @@ FLAGS: ra-cli-symbols USAGE: - ra_lsp_server highlight [FLAGS] + rust-analyzer highlight [FLAGS] FLAGS: -h, --help Prints help inforamtion" @@ -113,7 +113,7 @@ FLAGS: ra-cli-highlight USAGE: - ra_lsp_server highlight [FLAGS] + rust-analyzer highlight [FLAGS] FLAGS: -h, --help Prints help information @@ -133,7 +133,7 @@ FLAGS: ra-cli-analysis-stats USAGE: - ra_lsp_server analysis-stats [FLAGS] [OPTIONS] [PATH] + rust-analyzer analysis-stats [FLAGS] [OPTIONS] [PATH] FLAGS: -h, --help Prints help information @@ -168,10 +168,10 @@ ARGS: if matches.contains(["-h", "--help"]) { eprintln!( "\ -ra_lsp_server-analysis-bench +rust-analyzer-analysis-bench USAGE: - ra_lsp_server analysis-bench [FLAGS] [OPTIONS] [PATH] + rust-analyzer analysis-bench [FLAGS] [OPTIONS] [PATH] FLAGS: -h, --help Prints help information @@ -207,7 +207,7 @@ ARGS: ra-cli USAGE: - ra_lsp_server + rust-analyzer FLAGS: -h, --help Prints help information diff --git a/crates/ra_lsp_server/src/bin/main.rs b/crates/ra_lsp_server/src/bin/main.rs index e25d54a0d..69e709a25 100644 --- a/crates/ra_lsp_server/src/bin/main.rs +++ b/crates/ra_lsp_server/src/bin/main.rs @@ -4,8 +4,8 @@ mod args; use lsp_server::Connection; -use ra_lsp_server::{cli, from_json, show_message, Result, ServerConfig}; use ra_prof; +use rust_analyzer::{cli, from_json, show_message, Result, ServerConfig}; use crate::args::HelpPrinted; @@ -51,7 +51,7 @@ fn run_server() -> Result<()> { log::info!("lifecycle: server started"); let (connection, io_threads) = Connection::stdio(); - let server_capabilities = serde_json::to_value(ra_lsp_server::server_capabilities()).unwrap(); + let server_capabilities = serde_json::to_value(rust_analyzer::server_capabilities()).unwrap(); let initialize_params = connection.initialize(server_capabilities)?; let initialize_params = @@ -84,7 +84,7 @@ fn run_server() -> Result<()> { }) .unwrap_or_default(); - ra_lsp_server::main_loop( + rust_analyzer::main_loop( workspace_roots, initialize_params.capabilities, server_config, diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 67d8a5f6f..dc16a234d 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -1,4 +1,4 @@ -//! The main loop of `ra_lsp_server` responsible for dispatching LSP +//! The main loop of `rust-analyzer` responsible for dispatching LSP //! requests/replies and notifications back to the client. mod handlers; diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index 9ca31cbcc..3af63d9cf 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs @@ -7,7 +7,7 @@ use lsp_types::{ PartialResultParams, Position, Range, TextDocumentItem, TextDocumentPositionParams, WorkDoneProgressParams, }; -use ra_lsp_server::req::{ +use rust_analyzer::req::{ CodeActionParams, CodeActionRequest, Completion, CompletionParams, DidOpenTextDocument, Formatting, OnEnter, Runnables, RunnablesParams, }; diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index d5ea52fa9..5b90b3218 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs @@ -19,7 +19,7 @@ use serde_json::{to_string_pretty, Value}; use tempfile::TempDir; use test_utils::{find_mismatch, parse_fixture}; -use ra_lsp_server::{main_loop, req, ServerConfig}; +use rust_analyzer::{main_loop, req, ServerConfig}; pub struct Project<'a> { fixture: &'a str, diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 7ff8db58a..c267bc85f 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs @@ -351,13 +351,13 @@ impl Drop for Scope { /// 2. Build with `cpu_profiler` feature. /// 3. Tun the code, the *raw* output would be in the `./out.profile` file. /// 4. Install pprof for visualization (https://github.com/google/pprof). -/// 5. Use something like `pprof -svg target/release/ra_lsp_server ./out.profile` to see the results. +/// 5. Use something like `pprof -svg target/release/rust-analyzer ./out.profile` to see the results. /// /// For example, here's how I run profiling on NixOS: /// /// ```bash /// $ nix-shell -p gperftools --run \ -/// 'cargo run --release -p ra_lsp_server -- parse < ~/projects/rustbench/parser.rs > /dev/null' +/// 'cargo run --release -p rust-analyzer -- parse < ~/projects/rustbench/parser.rs > /dev/null' /// ``` #[derive(Debug)] pub struct CpuProfiler { diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index 83db943fe..cb72972c5 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml @@ -22,7 +22,7 @@ ra_text_edit = { path = "../ra_text_edit" } ra_parser = { path = "../ra_parser" } # This crate transitively depends on `smol_str` via `rowan`. -# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here +# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here # to reduce number of compilations smol_str = { version = "0.1.12", features = ["serde"] } serde = { version = "1", features = ["derive"] } diff --git a/crates/ra_tt/Cargo.toml b/crates/ra_tt/Cargo.toml index b8dceb92a..c9601fdcc 100644 --- a/crates/ra_tt/Cargo.toml +++ b/crates/ra_tt/Cargo.toml @@ -8,6 +8,6 @@ authors = ["rust-analyzer developers"] doctest = false [dependencies] -# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here +# ideally, `serde` should be enabled by `rust-analyzer`, but we enable it here # to reduce number of compilations smol_str = { version = "0.1.12", features = ["serde"] } -- cgit v1.2.3