Skip to content

Commit

Permalink
Rename the binary to rust-analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Feb 18, 2020
1 parent 4d307ff commit c0fa5e2
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 107 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 44,29 @@ jobs:
CC: clang
with:
command: build
args: --package ra_lsp_server --bin ra_lsp_server --release --target x86_64-unknown-linux-musl
args: --package rust-analyzer --bin rust-analyzer --release --target x86_64-unknown-linux-musl

- name: Build
if: matrix.os != 'ubuntu-latest'
uses: actions-rs/cargo@v1
with:
command: build
args: --package ra_lsp_server --bin ra_lsp_server --release
args: --package rust-analyzer --bin rust-analyzer --release

- name: Create distribution dir
run: mkdir ./dist

- name: Copy binary
if: matrix.os == 'ubuntu-latest'
run: cp ./target/x86_64-unknown-linux-musl/release/ra_lsp_server ./dist/ra_lsp_server-linux && strip ./dist/ra_lsp_server-linux
run: cp ./target/x86_64-unknown-linux-musl/release/rust-analyzer ./dist/rust-analyzer-linux && strip ./dist/rust-analyzer-linux

- name: Copy binary
if: matrix.os == 'macos-latest'
run: cp ./target/release/ra_lsp_server ./dist/ra_lsp_server-mac
run: cp ./target/release/rust-analyzer ./dist/rust-analyzer-mac

- name: Copy binary
if: matrix.os == 'windows-latest'
run: copy ./target/release/ra_lsp_server.exe ./dist/ra_lsp_server-windows.exe
run: copy ./target/release/rust-analyzer.exe ./dist/rust-analyzer-windows.exe

- name: Upload artifacts
uses: actions/upload-artifact@v1
Expand Down Expand Up @@ -153,26 153,26 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/ra_lsp_server-linux
asset_name: ra_lsp_server-linux
asset_path: ./dist/rust-analyzer-linux
asset_name: rust-analyzer-linux
asset_content_type: application/octet-stream

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/ra_lsp_server-mac
asset_name: ra_lsp_server-mac
asset_path: ./dist/rust-analyzer-mac
asset_name: rust-analyzer-mac
asset_content_type: application/octet-stream

- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/ra_lsp_server-windows.exe
asset_name: ra_lsp_server-windows.exe
asset_path: ./dist/rust-analyzer-windows.exe
asset_name: rust-analyzer-windows.exe
asset_content_type: application/octet-stream

- uses: actions/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 45,7 @@
"<node_internals>/**/*.js"
],
"env": {
"__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/ra_lsp_server"
"__RA_LSP_SERVER_DEBUG": "${workspaceFolder}/target/debug/rust-analyzer"
}
},
{
Expand All @@ -59,7 59,7 @@
"name": "Attach To Server",
"type": "lldb",
"request": "attach",
"program": "${workspaceFolder}/target/debug/ra_lsp_server",
"program": "${workspaceFolder}/target/debug/rust-analyzer",
"pid": "${command:pickMyProcess}",
"sourceLanguages": [
"rust"
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 19,7 @@
"label": "Build Server",
"group": "build",
"type": "shell",
"command": "cargo build --package ra_lsp_server",
"command": "cargo build --package rust-analyzer",
"problemMatcher": "$rustc"
},
]
Expand Down
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,7 @@ $ git clone https://github.com/rust-analyzer/rust-analyzer && cd rust-analyzer
# install both the language server and VS Code extension
$ cargo xtask install
# alternatively, install only the server. Binary name is `ra_lsp_server`.
# alternatively, install only the server. Binary name is `rust-analyzer`.
$ cargo xtask install --server
```

Expand Down
2 changes: 1 addition & 1 deletion crates/ra_db/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_ide_db/src/feature_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, bool>,
Expand Down
4 changes: 2 additions & 2 deletions crates/ra_lsp_server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
[package]
edition = "2018"
name = "ra_lsp_server"
name = "rust-analyzer"
version = "0.1.0"
authors = ["rust-analyzer developers"]
autobins = false
Expand All @@ -9,7 9,7 @@ autobins = false
doctest = false

[[bin]]
name = "ra_lsp_server"
name = "rust-analyzer"
path = "./src/bin/main.rs"

[dependencies]
Expand Down
16 changes: 8 additions & 8 deletions crates/ra_lsp_server/src/bin/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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
Expand All @@ -94,7 94,7 @@ FLAGS:
ra-cli-symbols
USAGE:
ra_lsp_server highlight [FLAGS]
rust-analyzer highlight [FLAGS]
FLAGS:
-h, --help Prints help inforamtion"
Expand All @@ -113,7 113,7 @@ FLAGS:
ra-cli-highlight
USAGE:
ra_lsp_server highlight [FLAGS]
rust-analyzer highlight [FLAGS]
FLAGS:
-h, --help Prints help information
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -207,7 207,7 @@ ARGS:
ra-cli
USAGE:
ra_lsp_server <SUBCOMMAND>
rust-analyzer <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
Expand Down
6 changes: 3 additions & 3 deletions crates/ra_lsp_server/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_lsp_server/src/main_loop.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_lsp_server/tests/heavy_tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_lsp_server/tests/heavy_tests/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions crates/ra_prof/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_syntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_tt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Loading

0 comments on commit c0fa5e2

Please sign in to comment.