Rename ra_project_model -> project_model

This commit is contained in:
Pavan Kumar Sunkara 2020-08-13 12:05:30 +02:00
parent b5cb16fb90
commit eac24d52e6
18 changed files with 40 additions and 43 deletions

40
Cargo.lock generated
View file

@ -938,6 +938,25 @@ dependencies = [
"perf-event",
]
[[package]]
name = "project_model"
version = "0.0.0"
dependencies = [
"anyhow",
"arena",
"cargo_metadata",
"cfg",
"log",
"paths",
"ra_db",
"ra_proc_macro",
"rustc-hash",
"serde",
"serde_json",
"stdx",
"toolchain",
]
[[package]]
name = "quote"
version = "1.0.7"
@ -1134,25 +1153,6 @@ dependencies = [
"tt",
]
[[package]]
name = "ra_project_model"
version = "0.1.0"
dependencies = [
"anyhow",
"arena",
"cargo_metadata",
"cfg",
"log",
"paths",
"ra_db",
"ra_proc_macro",
"rustc-hash",
"serde",
"serde_json",
"stdx",
"toolchain",
]
[[package]]
name = "ra_ssr"
version = "0.1.0"
@ -1257,13 +1257,13 @@ dependencies = [
"pico-args",
"proc_macro_srv",
"profile",
"project_model",
"ra_db",
"ra_hir",
"ra_hir_def",
"ra_hir_ty",
"ra_ide",
"ra_ide_db",
"ra_project_model",
"ra_ssr",
"rayon",
"rustc-hash",

View file

@ -1,9 +1,9 @@
[package]
edition = "2018"
name = "ra_project_model"
version = "0.1.0"
authors = ["rust-analyzer developers"]
name = "project_model"
version = "0.0.0"
license = "MIT OR Apache-2.0"
authors = ["rust-analyzer developers"]
edition = "2018"
[lib]
doctest = false
@ -11,8 +11,10 @@ doctest = false
[dependencies]
log = "0.4.8"
rustc-hash = "1.1.0"
cargo_metadata = "0.11.1"
serde = { version = "1.0.106", features = ["derive"] }
serde_json = "1.0.48"
anyhow = "1.0.26"
arena = { path = "../arena" }
cfg = { path = "../cfg" }
@ -21,8 +23,3 @@ toolchain = { path = "../toolchain" }
ra_proc_macro = { path = "../ra_proc_macro" }
paths = { path = "../paths" }
stdx = { path = "../stdx" }
serde = { version = "1.0.106", features = ["derive"] }
serde_json = "1.0.48"
anyhow = "1.0.26"

View file

@ -37,7 +37,7 @@ lsp-server = "0.3.3"
flycheck = { path = "../flycheck" }
ra_ide = { path = "../ra_ide" }
profile = { path = "../profile" }
ra_project_model = { path = "../ra_project_model" }
project_model = { path = "../project_model" }
syntax = { path = "../syntax" }
text_edit = { path = "../text_edit" }
vfs = { path = "../vfs" }

View file

@ -6,7 +6,7 @@ mod args;
use std::{convert::TryFrom, process};
use lsp_server::Connection;
use ra_project_model::ProjectManifest;
use project_model::ProjectManifest;
use rust_analyzer::{
cli,
config::{Config, LinkedProject},

View file

@ -1,8 +1,8 @@
//! See `CargoTargetSpec`
use cfg::CfgExpr;
use project_model::{self, TargetKind};
use ra_ide::{FileId, RunnableKind, TestId};
use ra_project_model::{self, TargetKind};
use vfs::AbsPathBuf;
use crate::{global_state::GlobalStateSnapshot, Result};

View file

@ -4,9 +4,9 @@ use std::{path::Path, sync::Arc};
use anyhow::Result;
use crossbeam_channel::{unbounded, Receiver};
use project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
use ra_db::CrateGraph;
use ra_ide::{AnalysisChange, AnalysisHost};
use ra_project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
use vfs::{loader::Handle, AbsPath, AbsPathBuf};
use crate::reload::{ProjectFolders, SourceRootConfig};

View file

@ -11,8 +11,8 @@ use std::{ffi::OsString, path::PathBuf};
use flycheck::FlycheckConfig;
use lsp_types::ClientCapabilities;
use project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
use ra_ide::{AssistConfig, CompletionConfig, HoverConfig, InlayHintsConfig};
use ra_project_model::{CargoConfig, ProjectJson, ProjectJsonData, ProjectManifest};
use serde::Deserialize;
use vfs::AbsPathBuf;

View file

@ -9,9 +9,9 @@ use crossbeam_channel::{unbounded, Receiver, Sender};
use flycheck::FlycheckHandle;
use lsp_types::{SemanticTokens, Url};
use parking_lot::{Mutex, RwLock};
use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
use ra_db::{CrateId, VfsPath};
use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
use ra_project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
use rustc_hash::FxHashMap;
use crate::{

View file

@ -18,11 +18,11 @@ use lsp_types::{
SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation, SymbolTag,
TextDocumentIdentifier, Url, WorkspaceEdit,
};
use project_model::TargetKind;
use ra_ide::{
FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, NavigationTarget, Query,
RangeInfo, Runnable, RunnableKind, SearchScope, TextEdit,
};
use ra_project_model::TargetKind;
use serde::{Deserialize, Serialize};
use serde_json::to_value;
use stdx::{format_to, split_once};

View file

@ -21,7 +21,7 @@ use crate::{
lsp_utils::{apply_document_changes, is_canceled, notification_is, Progress},
Result,
};
use ra_project_model::ProjectWorkspace;
use project_model::ProjectWorkspace;
use vfs::ChangeKind;
pub fn main_loop(config: Config, connection: Connection) -> Result<()> {

View file

@ -2,9 +2,9 @@
use std::{mem, sync::Arc};
use flycheck::FlycheckHandle;
use project_model::{ProcMacroClient, ProjectWorkspace};
use ra_db::{CrateGraph, SourceRoot, VfsPath};
use ra_ide::AnalysisChange;
use ra_project_model::{ProcMacroClient, ProjectWorkspace};
use vfs::{file_set::FileSetConfig, AbsPath, AbsPathBuf, ChangeKind};
use crate::{
@ -98,14 +98,14 @@ impl GlobalState {
.iter()
.map(|project| match project {
LinkedProject::ProjectManifest(manifest) => {
ra_project_model::ProjectWorkspace::load(
project_model::ProjectWorkspace::load(
manifest.clone(),
&cargo_config,
with_sysroot,
)
}
LinkedProject::InlineJsonProject(it) => {
Ok(ra_project_model::ProjectWorkspace::Json { project: it.clone() })
Ok(project_model::ProjectWorkspace::Json { project: it.clone() })
}
})
.collect::<Vec<_>>();

View file

@ -12,7 +12,7 @@ use lsp_types::{
notification::Exit, request::Shutdown, TextDocumentIdentifier, Url, WorkDoneProgress,
};
use lsp_types::{ProgressParams, ProgressParamsValue};
use ra_project_model::ProjectManifest;
use project_model::ProjectManifest;
use rust_analyzer::{
config::{ClientCapsConfig, Config, FilesConfig, FilesWatcher, LinkedProject},
main_loop,

View file

@ -198,7 +198,7 @@ impl TidyDocs {
"mbe",
"parser",
"profile",
"ra_project_model",
"project_model",
"syntax",
"tt",
"ra_hir_ty",