Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ members = [".", "crates/*", "xtask"]
edition = "2024"

[dependencies]
base-db.workspace = true
hir.workspace = true
ide.workspace = true
project-model.workspace = true
span.workspace = true
syntax.workspace = true
slang.workspace = true
utils.workspace = true
vfs-notify.workspace = true
vfs.workspace = true

always-assert.workspace = true
Expand Down Expand Up @@ -55,17 +52,13 @@ triomphe.workspace = true


[workspace.dependencies]
base-db = { path = "./crates/base-db/", version = "0.0.0" }
hir = { path = "./crates/hir/", version = "0.0.0" }
ide = { path = "./crates/ide/", version = "0.0.0" }
ide-db = { path = "./crates/ide-db/", version = "0.0.0" }
proc-macro-utils = { path = "./crates/proc-macro-utils/", version = "0.0.0" }
project-model = { path = "./crates/project-model/", version = "0.0.0" }
span = { path = "./crates/span/", version = "0.0.0" }
syntax = { path = "./crates/syntax/", version = "0.0.0" }
utils = { path = "./crates/utils", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify/", version = "0.0.0" }
slang = { path = "./crates/slang", version = "0.0.1" }
parking_lot = "0.12.1"

Expand Down
18 changes: 0 additions & 18 deletions crates/base-db/Cargo.toml

This file was deleted.

2 changes: 1 addition & 1 deletion crates/hir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.0.0"
edition.workspace = true

[dependencies]
base-db.workspace = true
hashbrown = { version = "0.12.3", features = ["inline-more"], default-features = false }
itertools.workspace = true
la-arena.workspace = true
Expand All @@ -14,6 +13,7 @@ salsa.workspace = true
smallvec.workspace = true
smol_str.workspace = true
syntax.workspace = true
tracing.workspace = true
triomphe.workspace = true
utils.workspace = true
vfs.workspace = true
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use salsa::Durability;
use triomphe::Arc;
use vfs::ChangedFile;

use crate::{
use crate::base_db::{
project::{PreprocessConfig, SharedProjectConfig},
source_db::SourceRootDb,
source_root::{SourceRoot, SourceRootId},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use utils::{
};
use vfs::FileId;

use crate::{
use crate::base_db::{
preproc_index::MacroIncludeTarget,
project::{CompilationProfileId, ProjectConfig},
source_db::{SourceFileKind, SourceRootDb},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ pub trait Lookup {
#[macro_export]
macro_rules! impl_intern_key {
($name:ident) => {
impl $crate::salsa::InternKey for $name {
fn from_intern_id(v: $crate::salsa::InternId) -> Self {
impl $crate::base_db::salsa::InternKey for $name {
fn from_intern_id(v: $crate::base_db::salsa::InternId) -> Self {
$name(v)
}

fn as_intern_id(&self) -> $crate::salsa::InternId {
fn as_intern_id(&self) -> $crate::base_db::salsa::InternId {
self.0
}
}
Expand All @@ -28,7 +28,7 @@ macro_rules! impl_intern_key {
#[macro_export]
macro_rules! impl_intern_lookup {
($db:ident, $id:ident, $loc:ident, $intern:ident, $lookup:ident) => {
impl $crate::intern::Intern for $loc {
impl $crate::base_db::intern::Intern for $loc {
type Database<'db> = dyn $db + 'db;
type ID = $id;

Expand All @@ -37,7 +37,7 @@ macro_rules! impl_intern_lookup {
}
}

impl $crate::intern::Lookup for $id {
impl $crate::base_db::intern::Lookup for $id {
type Data = $loc;
type Database<'db> = dyn $db + 'db;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use triomphe::Arc;
use utils::paths::AbsPathBuf;

use crate::source_root::SourceRootId;
use crate::base_db::source_root::SourceRootId;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CompilationProfileId(pub u32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use triomphe::Arc;
use utils::{line_index::TextSize, path_identity::PathIdentityIndex};
use vfs::{FileId, VfsPath, anchored_path::AnchoredPath};

use crate::{
use crate::base_db::{
compilation_plan::{self, CompilationPlan},
diagnostics_config::{DiagnosticSource, DiagnosticsConfig},
preproc_index::{self, PreprocFileIndex},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use vfs::{FileId, FileSet, FileSetConfig, Vfs, VfsPath, anchored_path::AnchoredPath};

use crate::source_db::SourceFileKind;
use crate::base_db::source_db::SourceFileKind;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SourceRootId(pub u32);
Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/container.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use base_db::intern::Lookup;
use proc_macro_utils::impl_container;
use smol_str::SmolStr;
use triomphe::Arc;
use utils::define_enum_deriving_from;
use vfs::FileId;

use crate::{
base_db::intern::Lookup,
db::{HirDb, InternDb},
file::HirFileId,
hir_def::{
Expand Down
3 changes: 2 additions & 1 deletion crates/hir/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use base_db::{impl_intern_key, impl_intern_lookup, salsa, source_db::SourceDb};
use syntax::SyntaxTree;
use triomphe::Arc;

use crate::{
base_db::{salsa, source_db::SourceDb},
file::HirFileId,
hir_def::{
block::{self, Block, BlockId, BlockLoc, BlockSourceMap},
Expand All @@ -16,6 +16,7 @@ use crate::{
},
subroutine::{self, Subroutine, SubroutineId, SubroutineLoc, SubroutineSourceMap},
},
impl_intern_key, impl_intern_lookup,
scope::{BlockScope, GenerateBlockScope, ModuleScope, SubroutineScope, UnitScope},
};

Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/display.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::fmt::{self, Debug};

use base_db::intern::Lookup;
use syntax::TimeUnit;
use triomphe::Arc;
use utils::get::GetRef;

use crate::{
base_db::intern::Lookup,
container::{InContainer, InModule},
db::HirDb,
hir_def::{
Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/has_source.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use base_db::intern::Lookup;
use utils::get::Get;

use crate::{
base_db::intern::Lookup,
container::InFile,
db::HirDb,
hir_def::{
Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/hir_def/block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use base_db::intern::Lookup;
use la_arena::Arena;
use proc_macro_utils::define_container;
use rustc_hash::FxHashMap;
Expand Down Expand Up @@ -33,6 +32,7 @@ use super::{
typedef::{Typedef, TypedefId, TypedefSrc, lower_typedef_data_ty},
};
use crate::{
base_db::intern::Lookup,
container::{ContainerId, InFile},
db::{HirDb, InternDb},
define_src_with_name,
Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/hir_def/module/generate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use base_db::intern::Lookup;
use la_arena::{Arena, Idx};
use proc_macro_utils::define_container;
use smallvec::SmallVec;
Expand All @@ -23,6 +22,7 @@ use super::{
},
};
use crate::{
base_db::intern::Lookup,
container::{ContainerId, InFile},
db::{HirDb, InternDb},
file::HirFileId,
Expand Down
2 changes: 1 addition & 1 deletion crates/hir/src/hir_def/subroutine.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use base_db::intern::Lookup;
use la_arena::{Arena, Idx};
use proc_macro_utils::define_container;
use rustc_hash::FxHashMap;
Expand Down Expand Up @@ -31,6 +30,7 @@ use super::{
typedef::{Typedef, TypedefId, TypedefSrc, lower_typedef_data_ty},
};
use crate::{
base_db::intern::Lookup,
container::{ContainerId, InFile},
db::{HirDb, InternDb},
define_src_with_name,
Expand Down
1 change: 1 addition & 0 deletions crates/hir/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(decl_macro)]

pub mod base_db;
pub mod container;
pub mod db;
pub mod display;
Expand Down
16 changes: 0 additions & 16 deletions crates/ide-db/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/ide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ edition.workspace = true

[dependencies]
anyhow.workspace = true
base-db.workspace = true
bitflags.workspace = true
dissimilar = "1.0.9"
hir.workspace = true
ide-db.workspace = true
itertools.workspace = true
la-arena.workspace = true
memchr.workspace = true
Expand All @@ -21,7 +19,6 @@ rustc-hash.workspace = true
serde.workspace = true
smol_str.workspace = true
smallvec.workspace = true
span.workspace = true
syntax.workspace = true
thiserror.workspace = true
toml = "0.9.8"
Expand Down
7 changes: 3 additions & 4 deletions crates/ide/src/analysis.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use std::ops::Range;

use base_db::{
use hir::base_db::{
Cancelled,
compilation_plan::CompilationPlan,
project::CompilationProfileId,
salsa,
source_db::{SourceDb, SourceRootDb},
source_root::{SourceRootId, SourceRootRole},
};
use ide_db::{line_index_db::LineIndexDb, root_db::RootDb};
use span::{FilePosition, RangeInfo};
use triomphe::Arc;
use utils::{
cancellation::CancellationToken,
Expand All @@ -20,13 +18,14 @@ use utils::{
use vfs::FileId;

use crate::{
Cancellable,
Cancellable, FilePosition, RangeInfo,
code_action::{self, CodeAction, CodeActionDiagnostics, CodeActionResolveStrategy},
code_lens::{self, CodeLens, CodeLensConfig, CodeLensKind},
completion::{
CompletionItem,
context::{CompletionContext, TriggerChar},
},
db::{line_index_db::LineIndexDb, root_db::RootDb},
diagnostics,
document_highlight::{self, DocumentHighlight, DocumentHighlightConfig},
document_symbols::{self, DocumentSymbol},
Expand Down
5 changes: 2 additions & 3 deletions crates/ide/src/analysis_host.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use base_db::{change::Change, salsa::ParallelDatabase};
use ide_db::root_db::RootDb;
use hir::base_db::{change::Change, salsa::ParallelDatabase};

use crate::analysis::Analysis;
use crate::{analysis::Analysis, db::root_db::RootDb};

pub struct AnalysisHost {
db: RootDb,
Expand Down
2 changes: 1 addition & 1 deletion crates/ide/src/code_action/context.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use hir::semantics::{ParsedFile, Semantics};
use ide_db::root_db::RootDb;
use syntax::{
SyntaxNode,
ast::{AstNode, CompilationUnit},
Expand All @@ -8,6 +7,7 @@ use utils::text_edit::{TextRange, TextSize};
use vfs::FileId;

use super::{CodeActionDiagnostics, RepairKind};
use crate::db::root_db::RootDb;

pub(crate) struct CodeActionCtx<'a> {
sema: &'a Semantics<'a, RootDb>,
Expand Down
2 changes: 1 addition & 1 deletion crates/ide/src/code_action/engine.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use hir::semantics::Semantics;
use ide_db::root_db::RootDb;
use utils::text_edit::TextRange;
use vfs::FileId;

use super::{
CodeAction, CodeActionCollector, CodeActionCtx, CodeActionDiagnostics,
CodeActionResolveStrategy, handlers,
};
use crate::db::root_db::RootDb;

pub(crate) fn code_action(
db: &RootDb,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use base_db::source_db::SourceDb;
use hir::{container::InModule, db::HirDb, hir_def::module::instantiation::PortConn};
use hir::{
base_db::source_db::SourceDb, container::InModule, db::HirDb,
hir_def::module::instantiation::PortConn,
};
use rustc_hash::FxHashSet;
use syntax::{
ast::{self, AstNode},
Expand Down
6 changes: 4 additions & 2 deletions crates/ide/src/code_action/handlers/add_missing_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use base_db::source_db::SourceDb;
use hir::{container::InModule, db::HirDb, hir_def::module::instantiation::ParamAssign};
use hir::{
base_db::source_db::SourceDb, container::InModule, db::HirDb,
hir_def::module::instantiation::ParamAssign,
};
use rustc_hash::FxHashSet;
use syntax::{
ast::{self, AstNode},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use base_db::source_db::SourceDb;
use hir::db::HirDb;
use hir::{base_db::source_db::SourceDb, db::HirDb};
use itertools::Itertools;
use syntax::{
ast::{self, AstNode},
Expand Down
3 changes: 2 additions & 1 deletion crates/ide/src/code_action/module_members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ use hir::{
},
semantics::Semantics,
};
use ide_db::root_db::RootDb;
use smol_str::SmolStr;
use utils::get::GetRef;

use crate::db::root_db::RootDb;

pub(crate) fn port_names(module: &Module) -> Vec<SmolStr> {
match &module.ports {
Ports::NonAnsi { ports, .. } => {
Expand Down
Loading
Loading