Rename ra_env -> ra_toolchain

This commit is contained in:
Aleksey Kladov 2020-05-08 12:25:36 +02:00
parent 8295a9340c
commit 6713be0b13
9 changed files with 23 additions and 21 deletions

20
Cargo.lock generated
View file

@ -957,14 +957,6 @@ dependencies = [
"test_utils",
]
[[package]]
name = "ra_env"
version = "0.1.0"
dependencies = [
"anyhow",
"home",
]
[[package]]
name = "ra_flycheck"
version = "0.1.0"
@ -975,7 +967,7 @@ dependencies = [
"jod-thread",
"log",
"lsp-types",
"ra_env",
"ra_toolchain",
"serde_json",
]
@ -1180,8 +1172,8 @@ dependencies = [
"ra_arena",
"ra_cfg",
"ra_db",
"ra_env",
"ra_proc_macro",
"ra_toolchain",
"rustc-hash",
"serde",
"serde_json",
@ -1213,6 +1205,14 @@ dependencies = [
"text-size",
]
[[package]]
name = "ra_toolchain"
version = "0.1.0"
dependencies = [
"anyhow",
"home",
]
[[package]]
name = "ra_tt"
version = "0.1.0"

View file

@ -14,7 +14,7 @@ log = "0.4.8"
cargo_metadata = "0.9.1"
serde_json = "1.0.48"
jod-thread = "0.1.1"
ra_env = { path = "../ra_env" }
ra_toolchain = { path = "../ra_toolchain" }
[dev-dependencies]
insta = "0.16.0"

View file

@ -16,7 +16,7 @@ use lsp_types::{
CodeAction, CodeActionOrCommand, Diagnostic, Url, WorkDoneProgress, WorkDoneProgressBegin,
WorkDoneProgressEnd, WorkDoneProgressReport,
};
use ra_env::get_path_for_executable;
use ra_toolchain::get_path_for_executable;
use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic};

View file

@ -16,7 +16,7 @@ cargo_metadata = "0.9.1"
ra_arena = { path = "../ra_arena" }
ra_cfg = { path = "../ra_cfg" }
ra_db = { path = "../ra_db" }
ra_env = { path = "../ra_env" }
ra_toolchain = { path = "../ra_toolchain" }
ra_proc_macro = { path = "../ra_proc_macro" }
serde = { version = "1.0.106", features = ["derive"] }

View file

@ -11,7 +11,7 @@ use anyhow::{Context, Result};
use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
use ra_arena::{Arena, Idx};
use ra_db::Edition;
use ra_env::get_path_for_executable;
use ra_toolchain::get_path_for_executable;
use rustc_hash::FxHashMap;
/// `CargoWorkspace` represents the logical structure of, well, a Cargo

View file

@ -14,7 +14,7 @@ use std::{
use anyhow::{bail, Context, Result};
use ra_cfg::CfgOptions;
use ra_db::{CrateGraph, CrateName, Edition, Env, ExternSource, ExternSourceId, FileId};
use ra_env::get_path_for_executable;
use ra_toolchain::get_path_for_executable;
use rustc_hash::FxHashMap;
use serde_json::from_reader;

View file

@ -1,14 +1,14 @@
//! FIXME: write short doc here
use anyhow::{bail, Context, Result};
use std::{
env, ops,
path::{Path, PathBuf},
process::{Command, Output},
};
use anyhow::{bail, Context, Result};
use ra_arena::{Arena, Idx};
use ra_env::get_path_for_executable;
use ra_toolchain::get_path_for_executable;
#[derive(Default, Debug, Clone)]
pub struct Sysroot {

View file

@ -1,6 +1,6 @@
[package]
edition = "2018"
name = "ra_env"
name = "ra_toolchain"
version = "0.1.0"
authors = ["rust-analyzer developers"]

View file

@ -1,11 +1,13 @@
//! This crate contains a single public function
//! [`get_path_for_executable`](fn.get_path_for_executable.html).
//! See docs there for more information.
use std::{
env,
path::{Path, PathBuf},
process::Command,
};
use anyhow::{bail, Result};
use std::env;
use std::path::{Path, PathBuf};
use std::process::Command;
/// Return a `PathBuf` to use for the given executable.
///