561: ⬆️ salsa r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-01-17 11:17:46 +00:00
commit 168c46ab77
14 changed files with 172 additions and 216 deletions

99
Cargo.lock generated
View file

@ -39,7 +39,7 @@ dependencies = [
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@ -47,7 +47,7 @@ name = "backtrace"
version = "0.3.13" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
@ -118,7 +118,7 @@ dependencies = [
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -246,9 +246,9 @@ name = "derive-new"
version = "0.5.6" version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -314,9 +314,9 @@ name = "failure_derive"
version = "0.1.5" version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -327,7 +327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "flexi_logger" name = "flexi_logger"
version = "0.10.4" version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -373,7 +373,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lsp-types 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)", "lsp-types 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -414,7 +414,7 @@ dependencies = [
[[package]] [[package]]
name = "im" name = "im"
version = "12.2.0" version = "12.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -437,7 +437,7 @@ dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -495,7 +495,7 @@ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -545,9 +545,9 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -629,9 +629,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"pest 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -646,7 +646,7 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.24" version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -679,7 +679,7 @@ name = "quote"
version = "0.6.10" version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -707,7 +707,7 @@ dependencies = [
"ra_syntax 0.1.0", "ra_syntax 0.1.0",
"relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"salsa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "salsa 0.10.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0", "test_utils 0.1.0",
] ]
@ -717,7 +717,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
"ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"flexi_logger 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "flexi_logger 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
"join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -726,7 +726,6 @@ dependencies = [
"ra_syntax 0.1.0", "ra_syntax 0.1.0",
"relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"salsa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0", "test_utils 0.1.0",
] ]
@ -747,7 +746,6 @@ dependencies = [
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"salsa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0", "test_utils 0.1.0",
"unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -776,9 +774,9 @@ dependencies = [
"drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"flexi_logger 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "flexi_logger 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
"gen_lsp_server 0.1.0", "gen_lsp_server 0.1.0",
"im 12.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "im 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lsp-types 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)", "lsp-types 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -791,7 +789,7 @@ dependencies = [
"relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0", "test_utils 0.1.0",
"thread_worker 0.1.0", "thread_worker 0.1.0",
@ -857,7 +855,7 @@ name = "rand"
version = "0.6.4" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -874,7 +872,7 @@ name = "rand_chacha"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1071,7 +1069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "salsa" name = "salsa"
version = "0.9.2" version = "0.10.0-alpha1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1080,9 +1078,21 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"salsa-macros 0.10.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "salsa-macros"
version = "0.10.0-alpha1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "same-file" name = "same-file"
version = "1.0.4" version = "1.0.4"
@ -1123,14 +1133,14 @@ name = "serde_derive"
version = "1.0.84" version = "1.0.84"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.35" version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1190,10 +1200,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "syn" name = "syn"
version = "0.15.25" version = "0.15.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1203,9 +1213,9 @@ name = "synstructure"
version = "0.10.1" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1236,7 +1246,7 @@ dependencies = [
"pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
"slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1277,7 +1287,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)",
"text_unit 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "text_unit 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1536,7 +1546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
"checksum autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e5f34df7a019573fb8bdc7e24a2bfebe51a2a1d6bfdbaeccedb3c41fc574727" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" "checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5"
"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
"checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" "checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2"
@ -1571,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
"checksum flexi_logger 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7d3681306880a7ce87740ceb3d1ce98ca92ae636ff30a629494488cbbcf85ff8" "checksum flexi_logger 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bbd731387787f54fa333fa426e173fe42ea3d1123636b2b27ad802025fc5d182"
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
"checksum fst 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "db72126ca7dff566cdbbdd54af44668c544897d9d3862b198141f176f1238bdf" "checksum fst 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "db72126ca7dff566cdbbdd54af44668c544897d9d3862b198141f176f1238bdf"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
@ -1581,7 +1591,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
"checksum im 12.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9c7f9bb8aee47fc16d535a705f7867a9fc83bb822e5e1043bb98e77ffeed3c" "checksum im 12.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0627d417829c1d763d602687634869f254fc79f7e22dea6c824dab993db857e4"
"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d"
"checksum insta 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60e94ba6dd3521d953caeed96f6ba06f4cdc9e30e398b3ee7acdd680294f87dc" "checksum insta 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60e94ba6dd3521d953caeed96f6ba06f4cdc9e30e398b3ee7acdd680294f87dc"
"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
@ -1610,7 +1620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
"checksum pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63120576c4efd69615b5537d3d052257328a4ca82876771d6944424ccfd9f646" "checksum pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63120576c4efd69615b5537d3d052257328a4ca82876771d6944424ccfd9f646"
"checksum pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5a3492a4ed208ffc247adcdcc7ba2a95be3104f58877d0d02f0df39bf3efb5e" "checksum pest_meta 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5a3492a4ed208ffc247adcdcc7ba2a95be3104f58877d0d02f0df39bf3efb5e"
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum proc-macro2 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "d3797b7142c9aa74954e351fc089bbee7958cebbff6bf2815e7ffff0b19f547d"
"checksum proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "926d0604475349f463fe44130aae73f2294b5309ab2ca0310b998bd334ef191f" "checksum proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "926d0604475349f463fe44130aae73f2294b5309ab2ca0310b998bd334ef191f"
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
@ -1640,14 +1650,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
"checksum rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9591f190d2852720b679c21f66ad929f9f1d7bb09d1193c26167586029d8489c" "checksum rusty-fork 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9591f190d2852720b679c21f66ad929f9f1d7bb09d1193c26167586029d8489c"
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
"checksum salsa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c73fd43ecb8ec5fbe64828ced981075b828109f011620d0fa1b66e9e983ceb84" "checksum salsa 0.10.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)" = "4cc048429df53bf0720b93cfa5fa8c3fc3dc7dd65ab41b3f754a8870e7b5c834"
"checksum salsa-macros 0.10.0-alpha1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d5a1aeb618da4b1a00d2885d045154ac30deb04109f3ce73c1fd789caba4fb1"
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "0e732ed5a5592c17d961555e3b552985baf98d50ce418b7b655f31f6ba7eb1b7" "checksum serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "0e732ed5a5592c17d961555e3b552985baf98d50ce418b7b655f31f6ba7eb1b7"
"checksum serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d6115a3ca25c224e409185325afc16a0d5aaaabc15c42b09587d6f1ba39a5b" "checksum serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d6115a3ca25c224e409185325afc16a0d5aaaabc15c42b09587d6f1ba39a5b"
"checksum serde_json 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb1277d4d0563e4593e0b8b5d23d744d277b55d2bc0bf1c38d0d8a6589d38aa" "checksum serde_json 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "574378d957d6dcdf1bbb5d562a15cbd5e644159432f84634b94e485267abbcc7"
"checksum sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9d1f3b5de8a167ab06834a7c883bd197f2191e1dda1a22d9ccfeedbf9aded" "checksum sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9d1f3b5de8a167ab06834a7c883bd197f2191e1dda1a22d9ccfeedbf9aded"
"checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" "checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373"
"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" "checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db"
@ -1655,7 +1666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
"checksum superslice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b50b13d42370e0f5fc62eafdd5c2d20065eaf5458dab215ff3e20e63eea96b30" "checksum superslice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b50b13d42370e0f5fc62eafdd5c2d20065eaf5458dab215ff3e20e63eea96b30"
"checksum syn 0.15.25 (registry+https://github.com/rust-lang/crates.io-index)" = "71b7693d9626935a362a3d1d4e59380800a919ebfa478d77a4f49e2a6d2c3ad5" "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2"
"checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3" "checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3"

View file

@ -6,7 +6,7 @@ authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
[dependencies] [dependencies]
relative-path = "0.4.0" relative-path = "0.4.0"
salsa = "0.9.2" salsa = "0.10.0-alpha1"
rustc-hash = "1.0" rustc-hash = "1.0"
parking_lot = "0.7.0" parking_lot = "0.7.0"
ra_arena = { path = "../ra_arena" } ra_arena = { path = "../ra_arena" }

View file

@ -146,46 +146,31 @@ impl CrateGraph {
} }
} }
salsa::query_group! { #[salsa::query_group]
pub trait FilesDatabase: salsa::Database { pub trait FilesDatabase: salsa::Database {
/// Text of the file. /// Text of the file.
fn file_text(file_id: FileId) -> Arc<String> { #[salsa::input]
type FileTextQuery; fn file_text(&self, file_id: FileId) -> Arc<String>;
storage input; /// Path to a file, relative to the root of its source root.
} #[salsa::input]
/// Path to a file, relative to the root of its source root. fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf;
fn file_relative_path(file_id: FileId) -> RelativePathBuf { /// Source root of the file.
type FileRelativePathQuery; #[salsa::input]
storage input; fn file_source_root(&self, file_id: FileId) -> SourceRootId;
} /// Contents of the source root.
/// Source root of the file. #[salsa::input]
fn file_source_root(file_id: FileId) -> SourceRootId { fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>;
type FileSourceRootQuery; /// The set of "local" (that is, from the current workspace) roots.
storage input; /// Files in local roots are assumed to change frequently.
} #[salsa::input]
/// Contents of the source root. fn local_roots(&self) -> Arc<Vec<SourceRootId>>;
fn source_root(id: SourceRootId) -> Arc<SourceRoot> { /// The set of roots for crates.io libraries.
type SourceRootQuery; /// Files in libraries are assumed to never change.
storage input; #[salsa::input]
} fn library_roots(&self) -> Arc<Vec<SourceRootId>>;
/// The set of "local" (that is, from the current workspace) roots. /// The crate graph.
/// Files in local roots are assumed to change frequently. #[salsa::input]
fn local_roots() -> Arc<Vec<SourceRootId>> { fn crate_graph(&self) -> Arc<CrateGraph>;
type LocalRootsQuery;
storage input;
}
/// The set of roots for crates.io libraries.
/// Files in libraries are assumed to never change.
fn library_roots() -> Arc<Vec<SourceRootId>> {
type LibraryRootsQuery;
storage input;
}
/// The crate graph.
fn crate_graph() -> Arc<CrateGraph> {
type CrateGraphQuery;
storage input;
}
}
} }
#[cfg(test)] #[cfg(test)]

View file

@ -9,6 +9,7 @@ use std::panic;
use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc}; use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc};
pub use ::salsa as salsa;
pub use crate::{ pub use crate::{
cancellation::Canceled, cancellation::Canceled,
syntax_ptr::LocalSyntaxPtr, syntax_ptr::LocalSyntaxPtr,
@ -51,12 +52,9 @@ pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe {
} }
} }
salsa::query_group! { #[salsa::query_group]
pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase {
fn source_file(file_id: FileId) -> TreeArc<SourceFile> { fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>;
type SourceFileQuery;
}
}
} }
fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreeArc<SourceFile> { fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreeArc<SourceFile> {

View file

@ -8,7 +8,6 @@ authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
arrayvec = "0.4.10" arrayvec = "0.4.10"
log = "0.4.5" log = "0.4.5"
relative-path = "0.4.0" relative-path = "0.4.0"
salsa = "0.9.2"
rustc-hash = "1.0" rustc-hash = "1.0"
parking_lot = "0.7.0" parking_lot = "0.7.0"
ena = "0.11" ena = "0.11"

View file

@ -1,7 +1,7 @@
use std::sync::Arc; use std::sync::Arc;
use ra_syntax::{SyntaxNode, TreeArc, SourceFile}; use ra_syntax::{SyntaxNode, TreeArc, SourceFile};
use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase}; use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase, salsa};
use crate::{ use crate::{
DefLoc, DefId, MacroCallLoc, MacroCallId, Name, HirFileId, DefLoc, DefId, MacroCallLoc, MacroCallId, Name, HirFileId,
@ -16,111 +16,77 @@ use crate::{
impl_block::ModuleImplBlocks, impl_block::ModuleImplBlocks,
}; };
salsa::query_group! { #[salsa::query_group]
pub trait HirDatabase:
pub trait HirDatabase: SyntaxDatabase SyntaxDatabase
+ AsRef<LocationIntener<DefLoc, DefId>> + AsRef<LocationIntener<DefLoc, DefId>>
+ AsRef<LocationIntener<MacroCallLoc, MacroCallId>> + AsRef<LocationIntener<MacroCallLoc, MacroCallId>>
{ {
fn hir_source_file(file_id: HirFileId) -> TreeArc<SourceFile> { #[salsa::invoke(HirFileId::hir_source_file)]
type HirSourceFileQuery; fn hir_source_file(&self, file_id: HirFileId) -> TreeArc<SourceFile>;
use fn HirFileId::hir_source_file;
}
fn expand_macro_invocation(invoc: MacroCallId) -> Option<Arc<MacroExpansion>> { #[salsa::invoke(crate::macros::expand_macro_invocation)]
type ExpandMacroCallQuery; fn expand_macro_invocation(&self, invoc: MacroCallId) -> Option<Arc<MacroExpansion>>;
use fn crate::macros::expand_macro_invocation;
}
fn fn_scopes(def_id: DefId) -> Arc<FnScopes> { #[salsa::invoke(query_definitions::fn_scopes)]
type FnScopesQuery; fn fn_scopes(&self, def_id: DefId) -> Arc<FnScopes>;
use fn query_definitions::fn_scopes;
}
fn struct_data(def_id: DefId) -> Arc<StructData> { #[salsa::invoke(crate::adt::StructData::struct_data_query)]
type StructDataQuery; fn struct_data(&self, def_id: DefId) -> Arc<StructData>;
use fn crate::adt::StructData::struct_data_query;
}
fn enum_data(def_id: DefId) -> Arc<EnumData> { #[salsa::invoke(crate::adt::EnumData::enum_data_query)]
type EnumDataQuery; fn enum_data(&self, def_id: DefId) -> Arc<EnumData>;
use fn crate::adt::EnumData::enum_data_query;
}
fn enum_variant_data(def_id: DefId) -> Arc<EnumVariantData> { #[salsa::invoke(crate::adt::EnumVariantData::enum_variant_data_query)]
type EnumVariantDataQuery; fn enum_variant_data(&self, def_id: DefId) -> Arc<EnumVariantData>;
use fn crate::adt::EnumVariantData::enum_variant_data_query;
}
fn infer(def_id: DefId) -> Arc<InferenceResult> { #[salsa::invoke(crate::ty::infer)]
type InferQuery; fn infer(&self, def_id: DefId) -> Arc<InferenceResult>;
use fn crate::ty::infer;
}
fn type_for_def(def_id: DefId) -> Ty { #[salsa::invoke(crate::ty::type_for_def)]
type TypeForDefQuery; fn type_for_def(&self, def_id: DefId) -> Ty;
use fn crate::ty::type_for_def;
}
fn type_for_field(def_id: DefId, field: Name) -> Option<Ty> { #[salsa::invoke(crate::ty::type_for_field)]
type TypeForFieldQuery; fn type_for_field(&self, def_id: DefId, field: Name) -> Option<Ty>;
use fn crate::ty::type_for_field;
}
fn file_items(file_id: HirFileId) -> Arc<SourceFileItems> { #[salsa::invoke(query_definitions::file_items)]
type SourceFileItemsQuery; fn file_items(&self, file_id: HirFileId) -> Arc<SourceFileItems>;
use fn query_definitions::file_items;
}
fn file_item(source_item_id: SourceItemId) -> TreeArc<SyntaxNode> { #[salsa::invoke(query_definitions::file_item)]
type FileItemQuery; fn file_item(&self, source_item_id: SourceItemId) -> TreeArc<SyntaxNode>;
use fn query_definitions::file_item;
}
fn submodules(source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>> { #[salsa::invoke(crate::module_tree::Submodule::submodules_query)]
type SubmodulesQuery; fn submodules(&self, source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>>;
use fn crate::module_tree::Submodule::submodules_query;
}
fn input_module_items(source_root_id: SourceRootId, module_id: ModuleId) -> Arc<InputModuleItems> { #[salsa::invoke(query_definitions::input_module_items)]
type InputModuleItemsQuery; fn input_module_items(
use fn query_definitions::input_module_items; &self,
} source_root_id: SourceRootId,
module_id: ModuleId,
) -> Arc<InputModuleItems>;
fn item_map(source_root_id: SourceRootId) -> Arc<ItemMap> { #[salsa::invoke(query_definitions::item_map)]
type ItemMapQuery; fn item_map(&self, source_root_id: SourceRootId) -> Arc<ItemMap>;
use fn query_definitions::item_map;
}
fn module_tree(source_root_id: SourceRootId) -> Arc<ModuleTree> { #[salsa::invoke(crate::module_tree::ModuleTree::module_tree_query)]
type ModuleTreeQuery; fn module_tree(&self, source_root_id: SourceRootId) -> Arc<ModuleTree>;
use fn crate::module_tree::ModuleTree::module_tree_query;
}
fn impls_in_module(source_root_id: SourceRootId, module_id: ModuleId) -> Arc<ModuleImplBlocks> { #[salsa::invoke(crate::impl_block::impls_in_module)]
type ImplsInModuleQuery; fn impls_in_module(
use fn crate::impl_block::impls_in_module; &self,
} source_root_id: SourceRootId,
module_id: ModuleId,
) -> Arc<ModuleImplBlocks>;
fn impls_in_crate(krate: Crate) -> Arc<CrateImplBlocks> { #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
type ImplsInCrateQuery; fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;
use fn crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query;
}
fn body_hir(def_id: DefId) -> Arc<crate::expr::Body> { #[salsa::invoke(crate::expr::body_hir)]
type BodyHirQuery; fn body_hir(&self, def_id: DefId) -> Arc<crate::expr::Body>;
use fn crate::expr::body_hir;
}
fn body_syntax_mapping(def_id: DefId) -> Arc<crate::expr::BodySyntaxMapping> { #[salsa::invoke(crate::expr::body_syntax_mapping)]
type BodySyntaxMappingQuery; fn body_syntax_mapping(&self, def_id: DefId) -> Arc<crate::expr::BodySyntaxMapping>;
use fn crate::expr::body_syntax_mapping;
}
fn fn_signature(def_id: DefId) -> Arc<FnSignature> {
type FnSignatureQuery;
use fn crate::FnSignature::fn_signature_query;
}
}
#[salsa::invoke(crate::FnSignature::fn_signature_query)]
fn fn_signature(&self, def_id: DefId) -> Arc<FnSignature>;
} }

View file

@ -1,8 +1,10 @@
use std::{sync::Arc, panic}; use std::{sync::Arc, panic};
use parking_lot::Mutex; use parking_lot::Mutex;
use salsa::{self, Database}; use ra_db::{
use ra_db::{LocationIntener, BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId}; LocationIntener, BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId,
salsa::{self, Database},
};
use relative_path::RelativePathBuf; use relative_path::RelativePathBuf;
use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset}; use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset};
@ -220,10 +222,10 @@ salsa::database_storage! {
} }
impl db::HirDatabase { impl db::HirDatabase {
fn hir_source_file() for db::HirSourceFileQuery; fn hir_source_file() for db::HirSourceFileQuery;
fn expand_macro_invocation() for db::ExpandMacroCallQuery; fn expand_macro_invocation() for db::ExpandMacroInvocationQuery;
fn module_tree() for db::ModuleTreeQuery; fn module_tree() for db::ModuleTreeQuery;
fn fn_scopes() for db::FnScopesQuery; fn fn_scopes() for db::FnScopesQuery;
fn file_items() for db::SourceFileItemsQuery; fn file_items() for db::FileItemsQuery;
fn file_item() for db::FileItemQuery; fn file_item() for db::FileItemQuery;
fn input_module_items() for db::InputModuleItemsQuery; fn input_module_items() for db::InputModuleItemsQuery;
fn item_map() for db::ItemMapQuery; fn item_map() for db::ItemMapQuery;

View file

@ -1,7 +1,6 @@
use std::sync::Arc; use std::sync::Arc;
use salsa::Database; use ra_db::{FilesDatabase, CrateGraph, SourceRootId, salsa::Database};
use ra_db::{FilesDatabase, CrateGraph, SourceRootId};
use relative_path::RelativePath; use relative_path::RelativePath;
use test_utils::assert_eq_text; use test_utils::assert_eq_text;

View file

@ -3,9 +3,7 @@ use std::fmt::Write;
use std::path::{PathBuf, Path}; use std::path::{PathBuf, Path};
use std::fs; use std::fs;
use salsa::Database; use ra_db::{SyntaxDatabase, salsa::Database};
use ra_db::SyntaxDatabase;
use ra_syntax::ast::{self, AstNode}; use ra_syntax::ast::{self, AstNode};
use test_utils::{project_dir, assert_eq_text, read_text}; use test_utils::{project_dir, assert_eq_text, read_text};

View file

@ -10,7 +10,6 @@ log = "0.4.5"
relative-path = "0.4.0" relative-path = "0.4.0"
rayon = "1.0.2" rayon = "1.0.2"
fst = "0.3.1" fst = "0.3.1"
salsa = "0.9.2"
rustc-hash = "1.0" rustc-hash = "1.0"
parking_lot = "0.7.0" parking_lot = "0.7.0"
unicase = "2.2.0" unicase = "2.2.0"

View file

@ -1,7 +1,9 @@
use std::{fmt, sync::Arc}; use std::{fmt, sync::Arc};
use salsa::{self, Database}; use ra_db::{
use ra_db::{LocationIntener, BaseDatabase, FileId, Canceled}; LocationIntener, BaseDatabase, FileId, Canceled,
salsa::{self, Database},
};
use crate::{symbol_index, LineIndex}; use crate::{symbol_index, LineIndex};
@ -73,12 +75,9 @@ impl AsRef<LocationIntener<hir::MacroCallLoc, hir::MacroCallId>> for RootDatabas
} }
} }
salsa::query_group! { #[salsa::query_group]
pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase { pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase {
fn line_index(file_id: FileId) -> Arc<LineIndex> { fn line_index(&self, file_id: FileId) -> Arc<LineIndex>;
type LineIndexQuery;
}
}
} }
fn line_index(db: &impl ra_db::FilesDatabase, file_id: FileId) -> Arc<LineIndex> { fn line_index(db: &impl ra_db::FilesDatabase, file_id: FileId) -> Arc<LineIndex> {
@ -109,10 +108,10 @@ salsa::database_storage! {
} }
impl hir::db::HirDatabase { impl hir::db::HirDatabase {
fn hir_source_file() for hir::db::HirSourceFileQuery; fn hir_source_file() for hir::db::HirSourceFileQuery;
fn expand_macro_invocation() for hir::db::ExpandMacroCallQuery; fn expand_macro_invocation() for hir::db::ExpandMacroInvocationQuery;
fn module_tree() for hir::db::ModuleTreeQuery; fn module_tree() for hir::db::ModuleTreeQuery;
fn fn_scopes() for hir::db::FnScopesQuery; fn fn_scopes() for hir::db::FnScopesQuery;
fn file_items() for hir::db::SourceFileItemsQuery; fn file_items() for hir::db::FileItemsQuery;
fn file_item() for hir::db::FileItemQuery; fn file_item() for hir::db::FileItemQuery;
fn input_module_items() for hir::db::InputModuleItemsQuery; fn input_module_items() for hir::db::InputModuleItemsQuery;
fn item_map() for hir::db::ItemMapQuery; fn item_map() for hir::db::ItemMapQuery;

View file

@ -1,11 +1,12 @@
use std::sync::Arc; use std::sync::Arc;
use salsa::Database;
use hir::{ use hir::{
self, Problem, source_binder, self, Problem, source_binder,
}; };
use ra_db::{FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase}; use ra_db::{
FilesDatabase, SourceRoot, SourceRootId, SyntaxDatabase,
salsa::{self, Database},
};
use ra_ide_api_light::{self, assists, LocalEdit, Severity}; use ra_ide_api_light::{self, assists, LocalEdit, Severity};
use ra_syntax::{ use ra_syntax::{
TextRange, AstNode, SourceFile, TextRange, AstNode, SourceFile,
@ -89,7 +90,7 @@ impl db::RootDatabase {
fn gc_syntax_trees(&mut self) { fn gc_syntax_trees(&mut self) {
self.query(ra_db::SourceFileQuery) self.query(ra_db::SourceFileQuery)
.sweep(salsa::SweepStrategy::default().discard_values()); .sweep(salsa::SweepStrategy::default().discard_values());
self.query(hir::db::SourceFileItemsQuery) self.query(hir::db::FileItemsQuery)
.sweep(salsa::SweepStrategy::default().discard_values()); .sweep(salsa::SweepStrategy::default().discard_values());
self.query(hir::db::FileItemQuery) self.query(hir::db::FileItemQuery)
.sweep(salsa::SweepStrategy::default().discard_values()); .sweep(salsa::SweepStrategy::default().discard_values());

View file

@ -28,11 +28,13 @@ use std::{fmt, sync::Arc};
use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit}; use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit};
use ra_text_edit::TextEdit; use ra_text_edit::TextEdit;
use ra_db::{SyntaxDatabase, FilesDatabase, BaseDatabase}; use ra_db::{
SyntaxDatabase, FilesDatabase, BaseDatabase,
salsa::{self, ParallelDatabase},
};
use rayon::prelude::*; use rayon::prelude::*;
use relative_path::RelativePathBuf; use relative_path::RelativePathBuf;
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use salsa::ParallelDatabase;
use crate::{ use crate::{
symbol_index::{FileSymbol, SymbolIndex}, symbol_index::{FileSymbol, SymbolIndex},

View file

@ -32,8 +32,10 @@ use ra_syntax::{
SyntaxKind::{self, *}, SyntaxKind::{self, *},
ast::{self, NameOwner}, ast::{self, NameOwner},
}; };
use ra_db::{SourceRootId, FilesDatabase, LocalSyntaxPtr}; use ra_db::{
use salsa::ParallelDatabase; SourceRootId, FilesDatabase, LocalSyntaxPtr,
salsa::{self, ParallelDatabase},
};
use rayon::prelude::*; use rayon::prelude::*;
use crate::{ use crate::{
@ -41,16 +43,11 @@ use crate::{
db::RootDatabase, db::RootDatabase,
}; };
salsa::query_group! { #[salsa::query_group]
pub(crate) trait SymbolsDatabase: hir::db::HirDatabase { pub(crate) trait SymbolsDatabase: hir::db::HirDatabase {
fn file_symbols(file_id: FileId) -> Arc<SymbolIndex> { fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>;
type FileSymbolsQuery; #[salsa::input]
} fn library_symbols(&self, id: SourceRootId) -> Arc<SymbolIndex>;
fn library_symbols(id: SourceRootId) -> Arc<SymbolIndex> {
type LibrarySymbolsQuery;
storage input;
}
}
} }
fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex> { fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex> {