aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock20
-rw-r--r--crates/ra_flycheck/Cargo.toml2
-rw-r--r--crates/ra_flycheck/src/lib.rs2
-rw-r--r--crates/ra_project_model/Cargo.toml2
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs2
-rw-r--r--crates/ra_project_model/src/lib.rs2
-rw-r--r--crates/ra_project_model/src/sysroot.rs4
-rw-r--r--crates/ra_toolchain/Cargo.toml (renamed from crates/ra_env/Cargo.toml)2
-rw-r--r--crates/ra_toolchain/src/lib.rs (renamed from crates/ra_env/src/lib.rs)8
9 files changed, 23 insertions, 21 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 36cff6402..656969c87 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -958,14 +958,6 @@ dependencies = [
958] 958]
959 959
960[[package]] 960[[package]]
961name = "ra_env"
962version = "0.1.0"
963dependencies = [
964 "anyhow",
965 "home",
966]
967
968[[package]]
969name = "ra_flycheck" 961name = "ra_flycheck"
970version = "0.1.0" 962version = "0.1.0"
971dependencies = [ 963dependencies = [
@@ -975,7 +967,7 @@ dependencies = [
975 "jod-thread", 967 "jod-thread",
976 "log", 968 "log",
977 "lsp-types", 969 "lsp-types",
978 "ra_env", 970 "ra_toolchain",
979 "serde_json", 971 "serde_json",
980] 972]
981 973
@@ -1180,8 +1172,8 @@ dependencies = [
1180 "ra_arena", 1172 "ra_arena",
1181 "ra_cfg", 1173 "ra_cfg",
1182 "ra_db", 1174 "ra_db",
1183 "ra_env",
1184 "ra_proc_macro", 1175 "ra_proc_macro",
1176 "ra_toolchain",
1185 "rustc-hash", 1177 "rustc-hash",
1186 "serde", 1178 "serde",
1187 "serde_json", 1179 "serde_json",
@@ -1214,6 +1206,14 @@ dependencies = [
1214] 1206]
1215 1207
1216[[package]] 1208[[package]]
1209name = "ra_toolchain"
1210version = "0.1.0"
1211dependencies = [
1212 "anyhow",
1213 "home",
1214]
1215
1216[[package]]
1217name = "ra_tt" 1217name = "ra_tt"
1218version = "0.1.0" 1218version = "0.1.0"
1219dependencies = [ 1219dependencies = [
diff --git a/crates/ra_flycheck/Cargo.toml b/crates/ra_flycheck/Cargo.toml
index d0f7fb2dc..03e557148 100644
--- a/crates/ra_flycheck/Cargo.toml
+++ b/crates/ra_flycheck/Cargo.toml
@@ -14,7 +14,7 @@ log = "0.4.8"
14cargo_metadata = "0.9.1" 14cargo_metadata = "0.9.1"
15serde_json = "1.0.48" 15serde_json = "1.0.48"
16jod-thread = "0.1.1" 16jod-thread = "0.1.1"
17ra_env = { path = "../ra_env" } 17ra_toolchain = { path = "../ra_toolchain" }
18 18
19[dev-dependencies] 19[dev-dependencies]
20insta = "0.16.0" 20insta = "0.16.0"
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs
index d8b727b0e..561657edb 100644
--- a/crates/ra_flycheck/src/lib.rs
+++ b/crates/ra_flycheck/src/lib.rs
@@ -16,7 +16,7 @@ use lsp_types::{
16 CodeAction, CodeActionOrCommand, Diagnostic, Url, WorkDoneProgress, WorkDoneProgressBegin, 16 CodeAction, CodeActionOrCommand, Diagnostic, Url, WorkDoneProgress, WorkDoneProgressBegin,
17 WorkDoneProgressEnd, WorkDoneProgressReport, 17 WorkDoneProgressEnd, WorkDoneProgressReport,
18}; 18};
19use ra_env::get_path_for_executable; 19use ra_toolchain::get_path_for_executable;
20 20
21use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic}; 21use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic};
22 22
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index 626478468..a32a5daab 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -16,7 +16,7 @@ cargo_metadata = "0.9.1"
16ra_arena = { path = "../ra_arena" } 16ra_arena = { path = "../ra_arena" }
17ra_cfg = { path = "../ra_cfg" } 17ra_cfg = { path = "../ra_cfg" }
18ra_db = { path = "../ra_db" } 18ra_db = { path = "../ra_db" }
19ra_env = { path = "../ra_env" } 19ra_toolchain = { path = "../ra_toolchain" }
20ra_proc_macro = { path = "../ra_proc_macro" } 20ra_proc_macro = { path = "../ra_proc_macro" }
21 21
22serde = { version = "1.0.106", features = ["derive"] } 22serde = { version = "1.0.106", features = ["derive"] }
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index eb9f33ee8..9683bfcc0 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -11,7 +11,7 @@ use anyhow::{Context, Result};
11use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId}; 11use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
12use ra_arena::{Arena, Idx}; 12use ra_arena::{Arena, Idx};
13use ra_db::Edition; 13use ra_db::Edition;
14use ra_env::get_path_for_executable; 14use ra_toolchain::get_path_for_executable;
15use rustc_hash::FxHashMap; 15use rustc_hash::FxHashMap;
16 16
17/// `CargoWorkspace` represents the logical structure of, well, a Cargo 17/// `CargoWorkspace` represents the logical structure of, well, a Cargo
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 88a6ffb2a..4f0b9c77e 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -14,7 +14,7 @@ use std::{
14use anyhow::{bail, Context, Result}; 14use anyhow::{bail, Context, Result};
15use ra_cfg::CfgOptions; 15use ra_cfg::CfgOptions;
16use ra_db::{CrateGraph, CrateName, Edition, Env, ExternSource, ExternSourceId, FileId}; 16use ra_db::{CrateGraph, CrateName, Edition, Env, ExternSource, ExternSourceId, FileId};
17use ra_env::get_path_for_executable; 17use ra_toolchain::get_path_for_executable;
18use rustc_hash::FxHashMap; 18use rustc_hash::FxHashMap;
19use serde_json::from_reader; 19use serde_json::from_reader;
20 20
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs
index 11c26ad89..2b628c2a3 100644
--- a/crates/ra_project_model/src/sysroot.rs
+++ b/crates/ra_project_model/src/sysroot.rs
@@ -1,14 +1,14 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use anyhow::{bail, Context, Result};
4use std::{ 3use std::{
5 env, ops, 4 env, ops,
6 path::{Path, PathBuf}, 5 path::{Path, PathBuf},
7 process::{Command, Output}, 6 process::{Command, Output},
8}; 7};
9 8
9use anyhow::{bail, Context, Result};
10use ra_arena::{Arena, Idx}; 10use ra_arena::{Arena, Idx};
11use ra_env::get_path_for_executable; 11use ra_toolchain::get_path_for_executable;
12 12
13#[derive(Default, Debug, Clone)] 13#[derive(Default, Debug, Clone)]
14pub struct Sysroot { 14pub struct Sysroot {
diff --git a/crates/ra_env/Cargo.toml b/crates/ra_toolchain/Cargo.toml
index f0a401be5..fbad1073e 100644
--- a/crates/ra_env/Cargo.toml
+++ b/crates/ra_toolchain/Cargo.toml
@@ -1,6 +1,6 @@
1[package] 1[package]
2edition = "2018" 2edition = "2018"
3name = "ra_env" 3name = "ra_toolchain"
4version = "0.1.0" 4version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6 6
diff --git a/crates/ra_env/src/lib.rs b/crates/ra_toolchain/src/lib.rs
index 413da1982..110c92c88 100644
--- a/crates/ra_env/src/lib.rs
+++ b/crates/ra_toolchain/src/lib.rs
@@ -1,11 +1,13 @@
1//! This crate contains a single public function 1//! This crate contains a single public function
2//! [`get_path_for_executable`](fn.get_path_for_executable.html). 2//! [`get_path_for_executable`](fn.get_path_for_executable.html).
3//! See docs there for more information. 3//! See docs there for more information.
4use std::{
5 env,
6 path::{Path, PathBuf},
7 process::Command,
8};
4 9
5use anyhow::{bail, Result}; 10use anyhow::{bail, Result};
6use std::env;
7use std::path::{Path, PathBuf};
8use std::process::Command;
9 11
10/// Return a `PathBuf` to use for the given executable. 12/// Return a `PathBuf` to use for the given executable.
11/// 13///