Skip to content

Commit 23cad90

Browse files
committed
⬆️ salsa
1 parent d102145 commit 23cad90

File tree

4 files changed

+40
-35
lines changed

4 files changed

+40
-35
lines changed

Cargo.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ra_analysis/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rayon = "1.0.2"
1111
fst = "0.3.1"
1212
ra_syntax = { path = "../ra_syntax" }
1313
ra_editor = { path = "../ra_editor" }
14-
salsa = "0.6.2"
14+
salsa = "0.7.0"
1515
rustc-hash = "1.0"
1616

1717
[dev-dependencies]

crates/ra_analysis/src/imp.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,20 @@ impl Default for FileResolverImp {
8484
}
8585
}
8686

87-
#[derive(Debug, Default)]
87+
#[derive(Debug)]
8888
pub(crate) struct AnalysisHostImpl {
8989
db: db::RootDatabase,
9090
}
9191

9292

9393
impl AnalysisHostImpl {
9494
pub fn new() -> AnalysisHostImpl {
95-
AnalysisHostImpl::default()
95+
let db = db::RootDatabase::default();
96+
db.query(crate::input::SourceRootQuery)
97+
.set(WORKSPACE, Default::default());
98+
db.query(crate::input::CrateGraphQuery)
99+
.set((), Default::default());
100+
AnalysisHostImpl { db }
96101
}
97102
pub fn analysis(&self) -> AnalysisImpl {
98103
AnalysisImpl {

crates/ra_analysis/src/input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ salsa::query_group! {
6767
}
6868
}
6969

70-
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
70+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
7171
pub(crate) struct SourceRootId(pub(crate) u32);
7272

73-
#[derive(Clone, Default, Debug, PartialEq, Eq)]
73+
#[derive(Default, Clone, Debug, PartialEq, Eq)]
7474
pub(crate) struct SourceRoot {
7575
pub(crate) file_resolver: FileResolverImp,
7676
pub(crate) files: FxHashSet<FileId>,

0 commit comments

Comments
 (0)