diff options
-rw-r--r-- | Cargo.lock | 7 | ||||
-rw-r--r-- | crates/ra_batch/src/lib.rs | 4 | ||||
-rw-r--r-- | crates/ra_db/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 1 | ||||
-rw-r--r-- | crates/ra_ide_api/src/db.rs | 4 |
5 files changed, 11 insertions, 7 deletions
diff --git a/Cargo.lock b/Cargo.lock index 579daecf1..2c1c7099e 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -1058,7 +1058,7 @@ dependencies = [ | |||
1058 | "ra_syntax 0.1.0", | 1058 | "ra_syntax 0.1.0", |
1059 | "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1059 | "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1060 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1060 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1061 | "salsa 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1061 | "salsa 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", |
1062 | "test_utils 0.1.0", | 1062 | "test_utils 0.1.0", |
1063 | ] | 1063 | ] |
1064 | 1064 | ||
@@ -1478,11 +1478,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
1478 | 1478 | ||
1479 | [[package]] | 1479 | [[package]] |
1480 | name = "salsa" | 1480 | name = "salsa" |
1481 | version = "0.12.2" | 1481 | version = "0.12.3" |
1482 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1483 | dependencies = [ | 1483 | dependencies = [ |
1484 | "derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", | 1484 | "derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", |
1485 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1485 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1486 | "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1486 | "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1487 | "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", |
1487 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", | 1488 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", |
1488 | "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | 1489 | "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", |
@@ -2125,7 +2126,7 @@ dependencies = [ | |||
2125 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" | 2126 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" |
2126 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | 2127 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" |
2127 | "checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" | 2128 | "checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" |
2128 | "checksum salsa 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2208fabe493ad352dc4f544c482b39e9b9a2c1719d9aa4a0f5e828a61210956" | 2129 | "checksum salsa 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2891cd628406e8a0ca714b827511de1bff76f796e3382cc72a3de732ccad5aea" |
2129 | "checksum salsa-macros 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7f1e25ca2b995bdf032946174929d62156ffd57abd7ff88dc6f9bdeb5ac0c59" | 2130 | "checksum salsa-macros 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7f1e25ca2b995bdf032946174929d62156ffd57abd7ff88dc6f9bdeb5ac0c59" |
2130 | "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" | 2131 | "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" |
2131 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" | 2132 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" |
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index a445dcb4d..02ea89306 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs | |||
@@ -7,7 +7,7 @@ use std::collections::HashSet; | |||
7 | use rustc_hash::FxHashMap; | 7 | use rustc_hash::FxHashMap; |
8 | 8 | ||
9 | use ra_db::{ | 9 | use ra_db::{ |
10 | CrateGraph, FileId, SourceRoot, SourceRootId, SourceDatabase, salsa, | 10 | CrateGraph, FileId, SourceRoot, SourceRootId, SourceDatabase, salsa::{self, Database}, |
11 | }; | 11 | }; |
12 | use ra_hir::db; | 12 | use ra_hir::db; |
13 | use ra_project_model::ProjectWorkspace; | 13 | use ra_project_model::ProjectWorkspace; |
@@ -43,6 +43,8 @@ fn vfs_root_to_id(r: ra_vfs::VfsRoot) -> SourceRootId { | |||
43 | impl BatchDatabase { | 43 | impl BatchDatabase { |
44 | pub fn load(crate_graph: CrateGraph, vfs: &mut Vfs) -> BatchDatabase { | 44 | pub fn load(crate_graph: CrateGraph, vfs: &mut Vfs) -> BatchDatabase { |
45 | let mut db = BatchDatabase { runtime: salsa::Runtime::default() }; | 45 | let mut db = BatchDatabase { runtime: salsa::Runtime::default() }; |
46 | db.query_mut(ra_db::ParseQuery).set_lru_capacity(128); | ||
47 | db.query_mut(ra_hir::db::ParseMacroQuery).set_lru_capacity(128); | ||
46 | db.set_crate_graph(Arc::new(crate_graph)); | 48 | db.set_crate_graph(Arc::new(crate_graph)); |
47 | 49 | ||
48 | // wait until Vfs has loaded all roots | 50 | // wait until Vfs has loaded all roots |
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml index 827855b2f..f73dd739a 100644 --- a/crates/ra_db/Cargo.toml +++ b/crates/ra_db/Cargo.toml | |||
@@ -5,7 +5,7 @@ version = "0.1.0" | |||
5 | authors = ["rust-analyzer developers"] | 5 | authors = ["rust-analyzer developers"] |
6 | 6 | ||
7 | [dependencies] | 7 | [dependencies] |
8 | salsa = "0.12.1" | 8 | salsa = "0.12.3" |
9 | relative-path = "0.4.0" | 9 | relative-path = "0.4.0" |
10 | rustc-hash = "1.0" | 10 | rustc-hash = "1.0" |
11 | 11 | ||
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 247dc0fee..ce03a0f95 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -225,7 +225,6 @@ impl RootDatabase { | |||
225 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 225 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |
226 | 226 | ||
227 | self.query(ra_db::ParseQuery).sweep(sweep); | 227 | self.query(ra_db::ParseQuery).sweep(sweep); |
228 | |||
229 | self.query(hir::db::ParseMacroQuery).sweep(sweep); | 228 | self.query(hir::db::ParseMacroQuery).sweep(sweep); |
230 | self.query(hir::db::MacroDefQuery).sweep(sweep); | 229 | self.query(hir::db::MacroDefQuery).sweep(sweep); |
231 | self.query(hir::db::MacroArgQuery).sweep(sweep); | 230 | self.query(hir::db::MacroArgQuery).sweep(sweep); |
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index d1a452ecb..4f19b01c4 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs | |||
@@ -5,7 +5,7 @@ use std::{ | |||
5 | 5 | ||
6 | use ra_db::{ | 6 | use ra_db::{ |
7 | CheckCanceled, FileId, Canceled, SourceDatabase, | 7 | CheckCanceled, FileId, Canceled, SourceDatabase, |
8 | salsa, | 8 | salsa::{self, Database}, |
9 | }; | 9 | }; |
10 | 10 | ||
11 | use crate::{LineIndex, symbol_index::{self, SymbolsDatabase}}; | 11 | use crate::{LineIndex, symbol_index::{self, SymbolsDatabase}}; |
@@ -49,6 +49,8 @@ impl Default for RootDatabase { | |||
49 | db.set_crate_graph(Default::default()); | 49 | db.set_crate_graph(Default::default()); |
50 | db.set_local_roots(Default::default()); | 50 | db.set_local_roots(Default::default()); |
51 | db.set_library_roots(Default::default()); | 51 | db.set_library_roots(Default::default()); |
52 | db.query_mut(ra_db::ParseQuery).set_lru_capacity(128); | ||
53 | db.query_mut(hir::db::ParseMacroQuery).set_lru_capacity(128); | ||
52 | db | 54 | db |
53 | } | 55 | } |
54 | } | 56 | } |