aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 11:10:03 +0100
committerGitHub <[email protected]>2020-08-13 11:10:03 +0100
commitde1d93455f85747410efb69c28e0c1379e8e328a (patch)
tree20eb4df06fc99236a30a98bba8e7ea3200b87042 /crates
parent8870a5ea138bb4ba048140d90d728721c4b4ad4b (diff)
parenteac24d52e672c0a9c118e8969bf1b839c3e7f1f3 (diff)
Merge #5744
5744: Rename ra_project_model -> project_model r=matklad a=pksunkara Co-authored-by: Pavan Kumar Sunkara <[email protected]>
Diffstat (limited to 'crates')
-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
16 files changed, 19 insertions, 22 deletions
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,