aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Kumar Sunkara <[email protected]>2020-08-13 11:05:30 +0100
committerPavan Kumar Sunkara <[email protected]>2020-08-13 11:05:30 +0100
commiteac24d52e672c0a9c118e8969bf1b839c3e7f1f3 (patch)
tree4e1218cc53bef75f54df35be80c6a254b85b8d9c
parentb5cb16fb90b4a1076604c5795552ee4abe07a057 (diff)
Rename ra_project_model -> project_model
-rw-r--r--Cargo.lock40
-rw-r--r--crates/project_model/Cargo.toml (renamed from crates/ra_project_model/Cargo.toml)17
-rw-r--r--crates/project_model/src/cargo_workspace.rs (renamed from crates/ra_project_model/src/cargo_workspace.rs)0
-rw-r--r--crates/project_model/src/cfg_flag.rs (renamed from crates/ra_project_model/src/cfg_flag.rs)0
-rw-r--r--crates/project_model/src/lib.rs (renamed from crates/ra_project_model/src/lib.rs)0
-rw-r--r--crates/project_model/src/project_json.rs (renamed from crates/ra_project_model/src/project_json.rs)0
-rw-r--r--crates/project_model/src/sysroot.rs (renamed from crates/ra_project_model/src/sysroot.rs)0
-rw-r--r--crates/rust-analyzer/Cargo.toml2
-rw-r--r--crates/rust-analyzer/src/bin/main.rs2
-rw-r--r--crates/rust-analyzer/src/cargo_target_spec.rs2
-rw-r--r--crates/rust-analyzer/src/cli/load_cargo.rs2
-rw-r--r--crates/rust-analyzer/src/config.rs2
-rw-r--r--crates/rust-analyzer/src/global_state.rs2
-rw-r--r--crates/rust-analyzer/src/handlers.rs2
-rw-r--r--crates/rust-analyzer/src/main_loop.rs2
-rw-r--r--crates/rust-analyzer/src/reload.rs6
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/support.rs2
-rw-r--r--xtask/tests/tidy.rs2
18 files changed, 40 insertions, 43 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 18c979b39..f72d9e022 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -939,6 +939,25 @@ dependencies = [
939] 939]
940 940
941[[package]] 941[[package]]
942name = "project_model"
943version = "0.0.0"
944dependencies = [
945 "anyhow",
946 "arena",
947 "cargo_metadata",
948 "cfg",
949 "log",
950 "paths",
951 "ra_db",
952 "ra_proc_macro",
953 "rustc-hash",
954 "serde",
955 "serde_json",
956 "stdx",
957 "toolchain",
958]
959
960[[package]]
942name = "quote" 961name = "quote"
943version = "1.0.7" 962version = "1.0.7"
944source = "registry+https://github.com/rust-lang/crates.io-index" 963source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1135,25 +1154,6 @@ dependencies = [
1135] 1154]
1136 1155
1137[[package]] 1156[[package]]
1138name = "ra_project_model"
1139version = "0.1.0"
1140dependencies = [
1141 "anyhow",
1142 "arena",
1143 "cargo_metadata",
1144 "cfg",
1145 "log",
1146 "paths",
1147 "ra_db",
1148 "ra_proc_macro",
1149 "rustc-hash",
1150 "serde",
1151 "serde_json",
1152 "stdx",
1153 "toolchain",
1154]
1155
1156[[package]]
1157name = "ra_ssr" 1157name = "ra_ssr"
1158version = "0.1.0" 1158version = "0.1.0"
1159dependencies = [ 1159dependencies = [
@@ -1257,13 +1257,13 @@ dependencies = [
1257 "pico-args", 1257 "pico-args",
1258 "proc_macro_srv", 1258 "proc_macro_srv",
1259 "profile", 1259 "profile",
1260 "project_model",
1260 "ra_db", 1261 "ra_db",
1261 "ra_hir", 1262 "ra_hir",
1262 "ra_hir_def", 1263 "ra_hir_def",
1263 "ra_hir_ty", 1264 "ra_hir_ty",
1264 "ra_ide", 1265 "ra_ide",
1265 "ra_ide_db", 1266 "ra_ide_db",
1266 "ra_project_model",
1267 "ra_ssr", 1267 "ra_ssr",
1268 "rayon", 1268 "rayon",
1269 "rustc-hash", 1269 "rustc-hash",
diff --git a/crates/ra_project_model/Cargo.toml b/crates/project_model/Cargo.toml
index 52f2d57b3..8d8d09387 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/project_model/Cargo.toml
@@ -1,9 +1,9 @@
1[package] 1[package]
2edition = "2018" 2name = "project_model"
3name = "ra_project_model" 3version = "0.0.0"
4version = "0.1.0"
5authors = ["rust-analyzer developers"]
6license = "MIT OR Apache-2.0" 4license = "MIT OR Apache-2.0"
5authors = ["rust-analyzer developers"]
6edition = "2018"
7 7
8[lib] 8[lib]
9doctest = false 9doctest = false
@@ -11,8 +11,10 @@ doctest = false
11[dependencies] 11[dependencies]
12log = "0.4.8" 12log = "0.4.8"
13rustc-hash = "1.1.0" 13rustc-hash = "1.1.0"
14
15cargo_metadata = "0.11.1" 14cargo_metadata = "0.11.1"
15serde = { version = "1.0.106", features = ["derive"] }
16serde_json = "1.0.48"
17anyhow = "1.0.26"
16 18
17arena = { path = "../arena" } 19arena = { path = "../arena" }
18cfg = { path = "../cfg" } 20cfg = { path = "../cfg" }
@@ -21,8 +23,3 @@ toolchain = { path = "../toolchain" }
21ra_proc_macro = { path = "../ra_proc_macro" } 23ra_proc_macro = { path = "../ra_proc_macro" }
22paths = { path = "../paths" } 24paths = { path = "../paths" }
23stdx = { path = "../stdx" } 25stdx = { path = "../stdx" }
24
25serde = { version = "1.0.106", features = ["derive"] }
26serde_json = "1.0.48"
27
28anyhow = "1.0.26"
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs
index abf8dca96..abf8dca96 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/project_model/src/cargo_workspace.rs
diff --git a/crates/ra_project_model/src/cfg_flag.rs b/crates/project_model/src/cfg_flag.rs
index e92962cf6..e92962cf6 100644
--- a/crates/ra_project_model/src/cfg_flag.rs
+++ b/crates/project_model/src/cfg_flag.rs
diff --git a/crates/ra_project_model/src/lib.rs b/crates/project_model/src/lib.rs
index ee42198f3..ee42198f3 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/project_model/src/lib.rs
diff --git a/crates/ra_project_model/src/project_json.rs b/crates/project_model/src/project_json.rs
index e3f3163f6..e3f3163f6 100644
--- a/crates/ra_project_model/src/project_json.rs
+++ b/crates/project_model/src/project_json.rs
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs
index 8239797b6..8239797b6 100644
--- a/crates/ra_project_model/src/sysroot.rs
+++ b/crates/project_model/src/sysroot.rs
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 440b1cd13..c6102bf27 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -37,7 +37,7 @@ lsp-server = "0.3.3"
37flycheck = { path = "../flycheck" } 37flycheck = { path = "../flycheck" }
38ra_ide = { path = "../ra_ide" } 38ra_ide = { path = "../ra_ide" }
39profile = { path = "../profile" } 39profile = { path = "../profile" }
40ra_project_model = { path = "../ra_project_model" } 40project_model = { path = "../project_model" }
41syntax = { path = "../syntax" } 41syntax = { path = "../syntax" }
42text_edit = { path = "../text_edit" } 42text_edit = { path = "../text_edit" }
43vfs = { path = "../vfs" } 43vfs = { path = "../vfs" }
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index f177f8709..bade31ca2 100644
--- a/crates/rust-analyzer/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/main.rs
@@ -6,7 +6,7 @@ mod args;
6use std::{convert::TryFrom, process}; 6use std::{convert::TryFrom, process};
7 7
8use lsp_server::Connection; 8use lsp_server::Connection;
9use ra_project_model::ProjectManifest; 9use project_model::ProjectManifest;
10use rust_analyzer::{ 10use rust_analyzer::{
11 cli, 11 cli,
12 config::{Config, LinkedProject}, 12 config::{Config, LinkedProject},
diff --git a/crates/rust-analyzer/src/cargo_target_spec.rs b/crates/rust-analyzer/src/cargo_target_spec.rs
index 9c7a9cce6..5ba30dbad 100644
--- a/crates/rust-analyzer/src/cargo_target_spec.rs
+++ b/crates/rust-analyzer/src/cargo_target_spec.rs
@@ -1,8 +1,8 @@
1//! See `CargoTargetSpec` 1//! See `CargoTargetSpec`
2 2
3use cfg::CfgExpr; 3use cfg::CfgExpr;
4use project_model::{self, TargetKind};
4use ra_ide::{FileId, RunnableKind, TestId}; 5use ra_ide::{FileId, RunnableKind, TestId};
5use ra_project_model::{self, TargetKind};
6use vfs::AbsPathBuf; 6use vfs::AbsPathBuf;
7 7
8use crate::{global_state::GlobalStateSnapshot, Result}; 8use crate::{global_state::GlobalStateSnapshot, Result};
diff --git a/crates/rust-analyzer/src/cli/load_cargo.rs b/crates/rust-analyzer/src/cli/load_cargo.rs
index a43bf2244..f6cb144c6 100644
--- a/crates/rust-analyzer/src/cli/load_cargo.rs
+++ b/crates/rust-analyzer/src/cli/load_cargo.rs
@@ -4,9 +4,9 @@ use std::{path::Path, sync::Arc};
4 4
5use anyhow::Result; 5use anyhow::Result;
6use crossbeam_channel::{unbounded, Receiver}; 6use crossbeam_channel::{unbounded, Receiver};
7use project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
7use ra_db::CrateGraph; 8use ra_db::CrateGraph;
8use ra_ide::{AnalysisChange, AnalysisHost}; 9use ra_ide::{AnalysisChange, AnalysisHost};
9use ra_project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
10use vfs::{loader::Handle, AbsPath, AbsPathBuf}; 10use vfs::{loader::Handle, AbsPath, AbsPathBuf};
11 11
12use crate::reload::{ProjectFolders, SourceRootConfig}; 12use crate::reload::{ProjectFolders, SourceRootConfig};
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 70b4512d0..bfc84147c 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -11,8 +11,8 @@ use std::{ffi::OsString, path::PathBuf};
11 11
12use flycheck::FlycheckConfig; 12use flycheck::FlycheckConfig;
13use lsp_types::ClientCapabilities; 13use lsp_types::ClientCapabilities;
14use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
14use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig}; 15use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
15use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
16use serde::Deserialize; 16use serde::Deserialize;
17use vfs::AbsPathBuf; 17use vfs::AbsPathBuf;
18 18
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs
index 8c115c8a6..2e8b708d0 100644
--- a/crates/rust-analyzer/src/global_state.rs
+++ b/crates/rust-analyzer/src/global_state.rs
@@ -9,9 +9,9 @@ use crossbeam_channel::{unbounded, Receiver, Sender};
9use flycheck::FlycheckHandle; 9use flycheck::FlycheckHandle;
10use lsp_types::{SemanticTokens, Url}; 10use lsp_types::{SemanticTokens, Url};
11use parking_lot::{Mutex, RwLock}; 11use parking_lot::{Mutex, RwLock};
12use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
12use ra_db::{CrateId, VfsPath}; 13use ra_db::{CrateId, VfsPath};
13use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId}; 14use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
14use ra_project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
15use rustc_hash::FxHashMap; 15use rustc_hash::FxHashMap;
16 16
17use crate::{ 17use crate::{
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 86e7833f2..4b5ca7eec 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -18,11 +18,11 @@ use lsp_types::{
18 SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation, SymbolTag, 18 SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation, SymbolTag,
19 TextDocumentIdentifier, Url, WorkspaceEdit, 19 TextDocumentIdentifier, Url, WorkspaceEdit,
20}; 20};
21use project_model::TargetKind;
21use ra_ide::{ 22use ra_ide::{
22 FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, NavigationTarget, Query, 23 FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, NavigationTarget, Query,
23 RangeInfo, Runnable, RunnableKind, SearchScope, TextEdit, 24 RangeInfo, Runnable, RunnableKind, SearchScope, TextEdit,
24}; 25};
25use ra_project_model::TargetKind;
26use serde::{Deserialize, Serialize}; 26use serde::{Deserialize, Serialize};
27use serde_json::to_value; 27use serde_json::to_value;
28use stdx::{format_to, split_once}; 28use stdx::{format_to, split_once};
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 32962b088..9a779cb14 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -21,7 +21,7 @@ use crate::{
21 lsp_utils::{apply_document_changes, is_canceled, notification_is, Progress}, 21 lsp_utils::{apply_document_changes, is_canceled, notification_is, Progress},
22 Result, 22 Result,
23}; 23};
24use ra_project_model::ProjectWorkspace; 24use project_model::ProjectWorkspace;
25use vfs::ChangeKind; 25use vfs::ChangeKind;
26 26
27pub fn main_loop(config: Config, connection: Connection) -> Result<()> { 27pub fn main_loop(config: Config, connection: Connection) -> Result<()> {
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index 611c9a89f..640417dc6 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -2,9 +2,9 @@
2use std::{mem, sync::Arc}; 2use std::{mem, sync::Arc};
3 3
4use flycheck::FlycheckHandle; 4use flycheck::FlycheckHandle;
5use project_model::{ProcMacroClient, ProjectWorkspace};
5use ra_db::{CrateGraph, SourceRoot, VfsPath}; 6use ra_db::{CrateGraph, SourceRoot, VfsPath};
6use ra_ide::AnalysisChange; 7use ra_ide::AnalysisChange;
7use ra_project_model::{ProcMacroClient, ProjectWorkspace};
8use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind}; 8use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind};
9 9
10use crate::{ 10use crate::{
@@ -98,14 +98,14 @@ impl GlobalState {
98 .iter() 98 .iter()
99 .map(|project| match project { 99 .map(|project| match project {
100 LinkedProject::ProjectManifest(manifest) => { 100 LinkedProject::ProjectManifest(manifest) => {
101 ra_project_model::ProjectWorkspace::load( 101 project_model::ProjectWorkspace::load(
102 manifest.clone(), 102 manifest.clone(),
103 &cargo_config, 103 &cargo_config,
104 with_sysroot, 104 with_sysroot,
105 ) 105 )
106 } 106 }
107 LinkedProject::InlineJsonProject(it) => { 107 LinkedProject::InlineJsonProject(it) => {
108 Ok(ra_project_model::ProjectWorkspace::Json { project: it.clone() }) 108 Ok(project_model::ProjectWorkspace::Json { project: it.clone() })
109 } 109 }
110 }) 110 })
111 .collect::<Vec<_>>(); 111 .collect::<Vec<_>>();
diff --git a/crates/rust-analyzer/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs
index 15866fbb1..5bafeba79 100644
--- a/crates/rust-analyzer/tests/heavy_tests/support.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/support.rs
@@ -12,7 +12,7 @@ use lsp_types::{
12 notification::Exit, request::Shutdown, TextDocumentIdentifier, Url, WorkDoneProgress, 12 notification::Exit, request::Shutdown, TextDocumentIdentifier, Url, WorkDoneProgress,
13}; 13};
14use lsp_types::{ProgressParams, ProgressParamsValue}; 14use lsp_types::{ProgressParams, ProgressParamsValue};
15use ra_project_model::ProjectManifest; 15use project_model::ProjectManifest;
16use rust_analyzer::{ 16use rust_analyzer::{
17 config::{ClientCapsConfig, Config, FilesConfig, FilesWatcher, LinkedProject}, 17 config::{ClientCapsConfig, Config, FilesConfig, FilesWatcher, LinkedProject},
18 main_loop, 18 main_loop,
diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs
index 0188aaa2e..2e68e71db 100644
--- a/xtask/tests/tidy.rs
+++ b/xtask/tests/tidy.rs
@@ -198,7 +198,7 @@ impl TidyDocs {
198 "mbe", 198 "mbe",
199 "parser", 199 "parser",
200 "profile", 200 "profile",
201 "ra_project_model", 201 "project_model",
202 "syntax", 202 "syntax",
203 "tt", 203 "tt",
204 "ra_hir_ty", 204 "ra_hir_ty",