mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-24 12:03:31 +00:00
⬆️ salsa
This commit is contained in:
parent
454cc31358
commit
a2ca03d10b
14 changed files with 172 additions and 216 deletions
99
Cargo.lock
generated
99
Cargo.lock
generated
|
@ -39,7 +39,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -47,7 +47,7 @@ name = "backtrace"
|
|||
version = "0.3.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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)",
|
||||
|
@ -118,7 +118,7 @@ dependencies = [
|
|||
"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_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]]
|
||||
|
@ -246,9 +246,9 @@ name = "derive-new"
|
|||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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]]
|
||||
|
@ -314,9 +314,9 @@ name = "failure_derive"
|
|||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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)",
|
||||
]
|
||||
|
||||
|
@ -327,7 +327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "flexi_logger"
|
||||
version = "0.10.4"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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)",
|
||||
"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_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]]
|
||||
|
@ -414,7 +414,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "im"
|
||||
version = "12.2.0"
|
||||
version = "12.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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)",
|
||||
"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_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]]
|
||||
|
@ -495,7 +495,7 @@ dependencies = [
|
|||
"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_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_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"
|
||||
dependencies = [
|
||||
"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)",
|
||||
"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]]
|
||||
|
@ -629,9 +629,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"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)",
|
||||
"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)",
|
||||
"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]]
|
||||
|
@ -646,7 +646,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.24"
|
||||
version = "0.4.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -679,7 +679,7 @@ name = "quote"
|
|||
version = "0.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
|
@ -707,7 +707,7 @@ dependencies = [
|
|||
"ra_syntax 0.1.0",
|
||||
"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)",
|
||||
"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",
|
||||
]
|
||||
|
||||
|
@ -717,7 +717,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"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)",
|
||||
"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)",
|
||||
"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)",
|
||||
|
@ -726,7 +726,6 @@ dependencies = [
|
|||
"ra_syntax 0.1.0",
|
||||
"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)",
|
||||
"salsa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"test_utils 0.1.0",
|
||||
]
|
||||
|
||||
|
@ -747,7 +746,6 @@ dependencies = [
|
|||
"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)",
|
||||
"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",
|
||||
"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)",
|
||||
"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)",
|
||||
"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",
|
||||
"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)",
|
||||
"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)",
|
||||
|
@ -791,7 +789,7 @@ dependencies = [
|
|||
"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)",
|
||||
"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)",
|
||||
"test_utils 0.1.0",
|
||||
"thread_worker 0.1.0",
|
||||
|
@ -857,7 +855,7 @@ name = "rand"
|
|||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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)",
|
||||
|
@ -874,7 +872,7 @@ name = "rand_chacha"
|
|||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
]
|
||||
|
||||
|
@ -1071,7 +1069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "salsa"
|
||||
version = "0.9.2"
|
||||
version = "0.10.0-alpha1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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)",
|
||||
"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)",
|
||||
"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)",
|
||||
]
|
||||
|
||||
[[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]]
|
||||
name = "same-file"
|
||||
version = "1.0.4"
|
||||
|
@ -1123,14 +1133,14 @@ name = "serde_derive"
|
|||
version = "1.0.84"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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]]
|
||||
name = "serde_json"
|
||||
version = "1.0.35"
|
||||
version = "1.0.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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]]
|
||||
name = "syn"
|
||||
version = "0.15.25"
|
||||
version = "0.15.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1203,9 +1213,9 @@ name = "synstructure"
|
|||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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)",
|
||||
"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)",
|
||||
]
|
||||
|
||||
|
@ -1236,7 +1246,7 @@ dependencies = [
|
|||
"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)",
|
||||
"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)",
|
||||
"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)",
|
||||
|
@ -1277,7 +1287,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"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)",
|
||||
"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)",
|
||||
]
|
||||
|
||||
|
@ -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 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 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-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"
|
||||
|
@ -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_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 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 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"
|
||||
|
@ -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 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 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 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"
|
||||
|
@ -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_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 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 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"
|
||||
|
@ -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 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 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 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-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_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 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"
|
||||
|
@ -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 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 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 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"
|
||||
|
|
|
@ -6,7 +6,7 @@ authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
|
|||
|
||||
[dependencies]
|
||||
relative-path = "0.4.0"
|
||||
salsa = "0.9.2"
|
||||
salsa = "0.10.0-alpha1"
|
||||
rustc-hash = "1.0"
|
||||
parking_lot = "0.7.0"
|
||||
ra_arena = { path = "../ra_arena" }
|
||||
|
|
|
@ -146,46 +146,31 @@ impl CrateGraph {
|
|||
}
|
||||
}
|
||||
|
||||
salsa::query_group! {
|
||||
pub trait FilesDatabase: salsa::Database {
|
||||
/// Text of the file.
|
||||
fn file_text(file_id: FileId) -> Arc<String> {
|
||||
type FileTextQuery;
|
||||
storage input;
|
||||
}
|
||||
/// Path to a file, relative to the root of its source root.
|
||||
fn file_relative_path(file_id: FileId) -> RelativePathBuf {
|
||||
type FileRelativePathQuery;
|
||||
storage input;
|
||||
}
|
||||
/// Source root of the file.
|
||||
fn file_source_root(file_id: FileId) -> SourceRootId {
|
||||
type FileSourceRootQuery;
|
||||
storage input;
|
||||
}
|
||||
/// Contents of the source root.
|
||||
fn source_root(id: SourceRootId) -> Arc<SourceRoot> {
|
||||
type SourceRootQuery;
|
||||
storage input;
|
||||
}
|
||||
/// The set of "local" (that is, from the current workspace) roots.
|
||||
/// Files in local roots are assumed to change frequently.
|
||||
fn local_roots() -> Arc<Vec<SourceRootId>> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
#[salsa::query_group]
|
||||
pub trait FilesDatabase: salsa::Database {
|
||||
/// Text of the file.
|
||||
#[salsa::input]
|
||||
fn file_text(&self, file_id: FileId) -> Arc<String>;
|
||||
/// Path to a file, relative to the root of its source root.
|
||||
#[salsa::input]
|
||||
fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf;
|
||||
/// Source root of the file.
|
||||
#[salsa::input]
|
||||
fn file_source_root(&self, file_id: FileId) -> SourceRootId;
|
||||
/// Contents of the source root.
|
||||
#[salsa::input]
|
||||
fn source_root(&self, id: SourceRootId) -> Arc<SourceRoot>;
|
||||
/// The set of "local" (that is, from the current workspace) roots.
|
||||
/// Files in local roots are assumed to change frequently.
|
||||
#[salsa::input]
|
||||
fn local_roots(&self) -> Arc<Vec<SourceRootId>>;
|
||||
/// The set of roots for crates.io libraries.
|
||||
/// Files in libraries are assumed to never change.
|
||||
#[salsa::input]
|
||||
fn library_roots(&self) -> Arc<Vec<SourceRootId>>;
|
||||
/// The crate graph.
|
||||
#[salsa::input]
|
||||
fn crate_graph(&self) -> Arc<CrateGraph>;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -9,6 +9,7 @@ use std::panic;
|
|||
|
||||
use ra_syntax::{TextUnit, TextRange, SourceFile, TreeArc};
|
||||
|
||||
pub use ::salsa as salsa;
|
||||
pub use crate::{
|
||||
cancellation::Canceled,
|
||||
syntax_ptr::LocalSyntaxPtr,
|
||||
|
@ -51,12 +52,9 @@ pub trait BaseDatabase: salsa::Database + panic::RefUnwindSafe {
|
|||
}
|
||||
}
|
||||
|
||||
salsa::query_group! {
|
||||
pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase {
|
||||
fn source_file(file_id: FileId) -> TreeArc<SourceFile> {
|
||||
type SourceFileQuery;
|
||||
}
|
||||
}
|
||||
#[salsa::query_group]
|
||||
pub trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase {
|
||||
fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>;
|
||||
}
|
||||
|
||||
fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> TreeArc<SourceFile> {
|
||||
|
|
|
@ -8,7 +8,6 @@ authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
|
|||
arrayvec = "0.4.10"
|
||||
log = "0.4.5"
|
||||
relative-path = "0.4.0"
|
||||
salsa = "0.9.2"
|
||||
rustc-hash = "1.0"
|
||||
parking_lot = "0.7.0"
|
||||
ena = "0.11"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use ra_syntax::{SyntaxNode, TreeArc, SourceFile};
|
||||
use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase};
|
||||
use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase, salsa};
|
||||
|
||||
use crate::{
|
||||
DefLoc, DefId, MacroCallLoc, MacroCallId, Name, HirFileId,
|
||||
|
@ -16,111 +16,77 @@ use crate::{
|
|||
impl_block::ModuleImplBlocks,
|
||||
};
|
||||
|
||||
salsa::query_group! {
|
||||
|
||||
pub trait HirDatabase: SyntaxDatabase
|
||||
#[salsa::query_group]
|
||||
pub trait HirDatabase:
|
||||
SyntaxDatabase
|
||||
+ AsRef<LocationIntener<DefLoc, DefId>>
|
||||
+ AsRef<LocationIntener<MacroCallLoc, MacroCallId>>
|
||||
{
|
||||
fn hir_source_file(file_id: HirFileId) -> TreeArc<SourceFile> {
|
||||
type HirSourceFileQuery;
|
||||
use fn HirFileId::hir_source_file;
|
||||
}
|
||||
#[salsa::invoke(HirFileId::hir_source_file)]
|
||||
fn hir_source_file(&self, file_id: HirFileId) -> TreeArc<SourceFile>;
|
||||
|
||||
fn expand_macro_invocation(invoc: MacroCallId) -> Option<Arc<MacroExpansion>> {
|
||||
type ExpandMacroCallQuery;
|
||||
use fn crate::macros::expand_macro_invocation;
|
||||
}
|
||||
#[salsa::invoke(crate::macros::expand_macro_invocation)]
|
||||
fn expand_macro_invocation(&self, invoc: MacroCallId) -> Option<Arc<MacroExpansion>>;
|
||||
|
||||
fn fn_scopes(def_id: DefId) -> Arc<FnScopes> {
|
||||
type FnScopesQuery;
|
||||
use fn query_definitions::fn_scopes;
|
||||
}
|
||||
#[salsa::invoke(query_definitions::fn_scopes)]
|
||||
fn fn_scopes(&self, def_id: DefId) -> Arc<FnScopes>;
|
||||
|
||||
fn struct_data(def_id: DefId) -> Arc<StructData> {
|
||||
type StructDataQuery;
|
||||
use fn crate::adt::StructData::struct_data_query;
|
||||
}
|
||||
#[salsa::invoke(crate::adt::StructData::struct_data_query)]
|
||||
fn struct_data(&self, def_id: DefId) -> Arc<StructData>;
|
||||
|
||||
fn enum_data(def_id: DefId) -> Arc<EnumData> {
|
||||
type EnumDataQuery;
|
||||
use fn crate::adt::EnumData::enum_data_query;
|
||||
}
|
||||
#[salsa::invoke(crate::adt::EnumData::enum_data_query)]
|
||||
fn enum_data(&self, def_id: DefId) -> Arc<EnumData>;
|
||||
|
||||
fn enum_variant_data(def_id: DefId) -> Arc<EnumVariantData> {
|
||||
type EnumVariantDataQuery;
|
||||
use fn crate::adt::EnumVariantData::enum_variant_data_query;
|
||||
}
|
||||
#[salsa::invoke(crate::adt::EnumVariantData::enum_variant_data_query)]
|
||||
fn enum_variant_data(&self, def_id: DefId) -> Arc<EnumVariantData>;
|
||||
|
||||
fn infer(def_id: DefId) -> Arc<InferenceResult> {
|
||||
type InferQuery;
|
||||
use fn crate::ty::infer;
|
||||
}
|
||||
#[salsa::invoke(crate::ty::infer)]
|
||||
fn infer(&self, def_id: DefId) -> Arc<InferenceResult>;
|
||||
|
||||
fn type_for_def(def_id: DefId) -> Ty {
|
||||
type TypeForDefQuery;
|
||||
use fn crate::ty::type_for_def;
|
||||
}
|
||||
#[salsa::invoke(crate::ty::type_for_def)]
|
||||
fn type_for_def(&self, def_id: DefId) -> Ty;
|
||||
|
||||
fn type_for_field(def_id: DefId, field: Name) -> Option<Ty> {
|
||||
type TypeForFieldQuery;
|
||||
use fn crate::ty::type_for_field;
|
||||
}
|
||||
#[salsa::invoke(crate::ty::type_for_field)]
|
||||
fn type_for_field(&self, def_id: DefId, field: Name) -> Option<Ty>;
|
||||
|
||||
fn file_items(file_id: HirFileId) -> Arc<SourceFileItems> {
|
||||
type SourceFileItemsQuery;
|
||||
use fn query_definitions::file_items;
|
||||
}
|
||||
#[salsa::invoke(query_definitions::file_items)]
|
||||
fn file_items(&self, file_id: HirFileId) -> Arc<SourceFileItems>;
|
||||
|
||||
fn file_item(source_item_id: SourceItemId) -> TreeArc<SyntaxNode> {
|
||||
type FileItemQuery;
|
||||
use fn query_definitions::file_item;
|
||||
}
|
||||
#[salsa::invoke(query_definitions::file_item)]
|
||||
fn file_item(&self, source_item_id: SourceItemId) -> TreeArc<SyntaxNode>;
|
||||
|
||||
fn submodules(source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>> {
|
||||
type SubmodulesQuery;
|
||||
use fn crate::module_tree::Submodule::submodules_query;
|
||||
}
|
||||
#[salsa::invoke(crate::module_tree::Submodule::submodules_query)]
|
||||
fn submodules(&self, source: SourceItemId) -> Arc<Vec<crate::module_tree::Submodule>>;
|
||||
|
||||
fn input_module_items(source_root_id: SourceRootId, module_id: ModuleId) -> Arc<InputModuleItems> {
|
||||
type InputModuleItemsQuery;
|
||||
use fn query_definitions::input_module_items;
|
||||
}
|
||||
#[salsa::invoke(query_definitions::input_module_items)]
|
||||
fn input_module_items(
|
||||
&self,
|
||||
source_root_id: SourceRootId,
|
||||
module_id: ModuleId,
|
||||
) -> Arc<InputModuleItems>;
|
||||
|
||||
fn item_map(source_root_id: SourceRootId) -> Arc<ItemMap> {
|
||||
type ItemMapQuery;
|
||||
use fn query_definitions::item_map;
|
||||
}
|
||||
#[salsa::invoke(query_definitions::item_map)]
|
||||
fn item_map(&self, source_root_id: SourceRootId) -> Arc<ItemMap>;
|
||||
|
||||
fn module_tree(source_root_id: SourceRootId) -> Arc<ModuleTree> {
|
||||
type ModuleTreeQuery;
|
||||
use fn crate::module_tree::ModuleTree::module_tree_query;
|
||||
}
|
||||
#[salsa::invoke(crate::module_tree::ModuleTree::module_tree_query)]
|
||||
fn module_tree(&self, source_root_id: SourceRootId) -> Arc<ModuleTree>;
|
||||
|
||||
fn impls_in_module(source_root_id: SourceRootId, module_id: ModuleId) -> Arc<ModuleImplBlocks> {
|
||||
type ImplsInModuleQuery;
|
||||
use fn crate::impl_block::impls_in_module;
|
||||
}
|
||||
#[salsa::invoke(crate::impl_block::impls_in_module)]
|
||||
fn impls_in_module(
|
||||
&self,
|
||||
source_root_id: SourceRootId,
|
||||
module_id: ModuleId,
|
||||
) -> Arc<ModuleImplBlocks>;
|
||||
|
||||
fn impls_in_crate(krate: Crate) -> Arc<CrateImplBlocks> {
|
||||
type ImplsInCrateQuery;
|
||||
use fn crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query;
|
||||
}
|
||||
#[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
|
||||
fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;
|
||||
|
||||
fn body_hir(def_id: DefId) -> Arc<crate::expr::Body> {
|
||||
type BodyHirQuery;
|
||||
use fn crate::expr::body_hir;
|
||||
}
|
||||
#[salsa::invoke(crate::expr::body_hir)]
|
||||
fn body_hir(&self, def_id: DefId) -> Arc<crate::expr::Body>;
|
||||
|
||||
fn body_syntax_mapping(def_id: DefId) -> Arc<crate::expr::BodySyntaxMapping> {
|
||||
type BodySyntaxMappingQuery;
|
||||
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::expr::body_syntax_mapping)]
|
||||
fn body_syntax_mapping(&self, def_id: DefId) -> Arc<crate::expr::BodySyntaxMapping>;
|
||||
|
||||
#[salsa::invoke(crate::FnSignature::fn_signature_query)]
|
||||
fn fn_signature(&self, def_id: DefId) -> Arc<FnSignature>;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
use std::{sync::Arc, panic};
|
||||
|
||||
use parking_lot::Mutex;
|
||||
use salsa::{self, Database};
|
||||
use ra_db::{LocationIntener, BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId};
|
||||
use ra_db::{
|
||||
LocationIntener, BaseDatabase, FilePosition, FileId, CrateGraph, SourceRoot, SourceRootId,
|
||||
salsa::{self, Database},
|
||||
};
|
||||
use relative_path::RelativePathBuf;
|
||||
use test_utils::{parse_fixture, CURSOR_MARKER, extract_offset};
|
||||
|
||||
|
@ -220,10 +222,10 @@ salsa::database_storage! {
|
|||
}
|
||||
impl db::HirDatabase {
|
||||
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 fn_scopes() for db::FnScopesQuery;
|
||||
fn file_items() for db::SourceFileItemsQuery;
|
||||
fn file_items() for db::FileItemsQuery;
|
||||
fn file_item() for db::FileItemQuery;
|
||||
fn input_module_items() for db::InputModuleItemsQuery;
|
||||
fn item_map() for db::ItemMapQuery;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use salsa::Database;
|
||||
use ra_db::{FilesDatabase, CrateGraph, SourceRootId};
|
||||
use ra_db::{FilesDatabase, CrateGraph, SourceRootId, salsa::Database};
|
||||
use relative_path::RelativePath;
|
||||
use test_utils::assert_eq_text;
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ use std::fmt::Write;
|
|||
use std::path::{PathBuf, Path};
|
||||
use std::fs;
|
||||
|
||||
use salsa::Database;
|
||||
|
||||
use ra_db::SyntaxDatabase;
|
||||
use ra_db::{SyntaxDatabase, salsa::Database};
|
||||
use ra_syntax::ast::{self, AstNode};
|
||||
use test_utils::{project_dir, assert_eq_text, read_text};
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ log = "0.4.5"
|
|||
relative-path = "0.4.0"
|
||||
rayon = "1.0.2"
|
||||
fst = "0.3.1"
|
||||
salsa = "0.9.2"
|
||||
rustc-hash = "1.0"
|
||||
parking_lot = "0.7.0"
|
||||
unicase = "2.2.0"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
use std::{fmt, sync::Arc};
|
||||
|
||||
use salsa::{self, Database};
|
||||
use ra_db::{LocationIntener, BaseDatabase, FileId, Canceled};
|
||||
use ra_db::{
|
||||
LocationIntener, BaseDatabase, FileId, Canceled,
|
||||
salsa::{self, Database},
|
||||
};
|
||||
|
||||
use crate::{symbol_index, LineIndex};
|
||||
|
||||
|
@ -73,12 +75,9 @@ impl AsRef<LocationIntener<hir::MacroCallLoc, hir::MacroCallId>> for RootDatabas
|
|||
}
|
||||
}
|
||||
|
||||
salsa::query_group! {
|
||||
pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase {
|
||||
fn line_index(file_id: FileId) -> Arc<LineIndex> {
|
||||
type LineIndexQuery;
|
||||
}
|
||||
}
|
||||
#[salsa::query_group]
|
||||
pub(crate) trait LineIndexDatabase: ra_db::FilesDatabase + BaseDatabase {
|
||||
fn line_index(&self, 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 {
|
||||
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 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 input_module_items() for hir::db::InputModuleItemsQuery;
|
||||
fn item_map() for hir::db::ItemMapQuery;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use salsa::Database;
|
||||
|
||||
use hir::{
|
||||
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_syntax::{
|
||||
TextRange, AstNode, SourceFile,
|
||||
|
@ -89,7 +90,7 @@ impl db::RootDatabase {
|
|||
fn gc_syntax_trees(&mut self) {
|
||||
self.query(ra_db::SourceFileQuery)
|
||||
.sweep(salsa::SweepStrategy::default().discard_values());
|
||||
self.query(hir::db::SourceFileItemsQuery)
|
||||
self.query(hir::db::FileItemsQuery)
|
||||
.sweep(salsa::SweepStrategy::default().discard_values());
|
||||
self.query(hir::db::FileItemQuery)
|
||||
.sweep(salsa::SweepStrategy::default().discard_values());
|
||||
|
|
|
@ -28,11 +28,13 @@ use std::{fmt, sync::Arc};
|
|||
|
||||
use ra_syntax::{SourceFile, TreeArc, TextRange, TextUnit};
|
||||
use ra_text_edit::TextEdit;
|
||||
use ra_db::{SyntaxDatabase, FilesDatabase, BaseDatabase};
|
||||
use ra_db::{
|
||||
SyntaxDatabase, FilesDatabase, BaseDatabase,
|
||||
salsa::{self, ParallelDatabase},
|
||||
};
|
||||
use rayon::prelude::*;
|
||||
use relative_path::RelativePathBuf;
|
||||
use rustc_hash::FxHashMap;
|
||||
use salsa::ParallelDatabase;
|
||||
|
||||
use crate::{
|
||||
symbol_index::{FileSymbol, SymbolIndex},
|
||||
|
|
|
@ -32,8 +32,10 @@ use ra_syntax::{
|
|||
SyntaxKind::{self, *},
|
||||
ast::{self, NameOwner},
|
||||
};
|
||||
use ra_db::{SourceRootId, FilesDatabase, LocalSyntaxPtr};
|
||||
use salsa::ParallelDatabase;
|
||||
use ra_db::{
|
||||
SourceRootId, FilesDatabase, LocalSyntaxPtr,
|
||||
salsa::{self, ParallelDatabase},
|
||||
};
|
||||
use rayon::prelude::*;
|
||||
|
||||
use crate::{
|
||||
|
@ -41,16 +43,11 @@ use crate::{
|
|||
db::RootDatabase,
|
||||
};
|
||||
|
||||
salsa::query_group! {
|
||||
pub(crate) trait SymbolsDatabase: hir::db::HirDatabase {
|
||||
fn file_symbols(file_id: FileId) -> Arc<SymbolIndex> {
|
||||
type FileSymbolsQuery;
|
||||
}
|
||||
fn library_symbols(id: SourceRootId) -> Arc<SymbolIndex> {
|
||||
type LibrarySymbolsQuery;
|
||||
storage input;
|
||||
}
|
||||
}
|
||||
#[salsa::query_group]
|
||||
pub(crate) trait SymbolsDatabase: hir::db::HirDatabase {
|
||||
fn file_symbols(&self, file_id: FileId) -> Arc<SymbolIndex>;
|
||||
#[salsa::input]
|
||||
fn library_symbols(&self, id: SourceRootId) -> Arc<SymbolIndex>;
|
||||
}
|
||||
|
||||
fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex> {
|
||||
|
|
Loading…
Reference in a new issue