diff options
author | Aleksey Kladov <[email protected]> | 2019-01-25 20:27:16 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-25 20:27:16 +0000 |
commit | 1fd18f020dcf01a441925ac0a368a31f3ddf4047 (patch) | |
tree | 8468850033bff56da6829451922e5d90ce804fd2 /crates/ra_ide_api/src | |
parent | d65dca6bb3844d71ca14c396497783cbf9650e4a (diff) |
:arrow_up: salsa
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/db.rs | 12 | ||||
-rw-r--r-- | crates/ra_ide_api/src/imp.rs | 10 | ||||
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index f0190ae51..30891aed4 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs | |||
@@ -8,11 +8,11 @@ use ra_db::{ | |||
8 | use crate::{symbol_index, LineIndex}; | 8 | use crate::{symbol_index, LineIndex}; |
9 | 9 | ||
10 | #[salsa::database( | 10 | #[salsa::database( |
11 | ra_db::FilesDatabase, | 11 | ra_db::FilesDatabaseStorage, |
12 | ra_db::SyntaxDatabase, | 12 | ra_db::SyntaxDatabaseStorage, |
13 | LineIndexDatabase, | 13 | LineIndexDatabaseStorage, |
14 | symbol_index::SymbolsDatabase, | 14 | symbol_index::SymbolsDatabaseStorage, |
15 | hir::db::HirDatabase | 15 | hir::db::HirDatabaseStorage |
16 | )] | 16 | )] |
17 | #[derive(Debug)] | 17 | #[derive(Debug)] |
18 | pub(crate) struct RootDatabase { | 18 | pub(crate) struct RootDatabase { |
@@ -62,7 +62,7 @@ impl AsRef<hir::HirInterner> for RootDatabase { | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | #[salsa::query_group] | 65 | #[salsa::query_group(LineIndexDatabaseStorage)] |
66 | pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase { | 66 | pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase { |
67 | fn line_index(&self, file_id: FileId) -> Arc<LineIndex>; | 67 | fn line_index(&self, file_id: FileId) -> Arc<LineIndex>; |
68 | } | 68 | } |
diff --git a/crates/ra_ide_api/src/imp.rs b/crates/ra_ide_api/src/imp.rs index 961f7b230..bd9e3f1e3 100644 --- a/crates/ra_ide_api/src/imp.rs +++ b/crates/ra_ide_api/src/imp.rs | |||
@@ -5,7 +5,7 @@ use hir::{ | |||
5 | }; | 5 | }; |
6 | use ra_db::{ | 6 | use ra_db::{ |
7 | FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase, | 7 | FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase, |
8 | salsa::Database, | 8 | salsa::{Database, SweepStrategy}, |
9 | }; | 9 | }; |
10 | use ra_ide_api_light::{self, assists, LocalEdit, Severity}; | 10 | use ra_ide_api_light::{self, assists, LocalEdit, Severity}; |
11 | use ra_syntax::{ | 11 | use ra_syntax::{ |
@@ -77,13 +77,13 @@ impl db::RootDatabase { | |||
77 | /// for some reason. Needs investigation. | 77 | /// for some reason. Needs investigation. |
78 | pub(crate) fn collect_garbage(&mut self) { | 78 | pub(crate) fn collect_garbage(&mut self) { |
79 | self.query(ra_db::SourceFileQuery) | 79 | self.query(ra_db::SourceFileQuery) |
80 | .sweep(salsa::SweepStrategy::default().discard_values()); | 80 | .sweep(SweepStrategy::default().discard_values()); |
81 | self.query(hir::db::HirSourceFileQuery) | 81 | self.query(hir::db::HirSourceFileQuery) |
82 | .sweep(salsa::SweepStrategy::default().discard_values()); | 82 | .sweep(SweepStrategy::default().discard_values()); |
83 | self.query(hir::db::FileItemsQuery) | 83 | self.query(hir::db::FileItemsQuery) |
84 | .sweep(salsa::SweepStrategy::default().discard_values()); | 84 | .sweep(SweepStrategy::default().discard_values()); |
85 | self.query(hir::db::FileItemQuery) | 85 | self.query(hir::db::FileItemQuery) |
86 | .sweep(salsa::SweepStrategy::default().discard_values()); | 86 | .sweep(SweepStrategy::default().discard_values()); |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 6184ad3ec..e073a349e 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -44,7 +44,7 @@ use crate::{ | |||
44 | db::RootDatabase, | 44 | db::RootDatabase, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #[salsa::query_group] | 47 | #[salsa::query_group(SymbolsDatabaseStorage)] |
48 | pub(crate) trait SymbolsDatabase: hir::db::HirDatabase { | 48 | pub(crate) trait SymbolsDatabase: hir::db::HirDatabase { |
49 | fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>; | 49 | fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>; |
50 | #[salsa::input] | 50 | #[salsa::input] |