mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 13:23:25 +00:00
chore: Remove unused dependencies
This commit is contained in:
parent
3bf18d4eba
commit
d4122434dd
23 changed files with 45 additions and 96 deletions
35
Cargo.lock
generated
35
Cargo.lock
generated
|
|
@ -1,6 +1,6 @@
|
||||||
# This file is automatically @generated by Cargo.
|
# This file is automatically @generated by Cargo.
|
||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "addr2line"
|
name = "addr2line"
|
||||||
|
|
@ -32,12 +32,6 @@ version = "0.2.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "always-assert"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a1078fa1ce1e34b1872d8611ad921196d76bdd7027e949fbe31231abde201892"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.97"
|
version = "1.0.97"
|
||||||
|
|
@ -85,13 +79,11 @@ dependencies = [
|
||||||
"dashmap 5.5.3",
|
"dashmap 5.5.3",
|
||||||
"intern",
|
"intern",
|
||||||
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lz4_flex",
|
|
||||||
"query-group-macro",
|
"query-group-macro",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"salsa",
|
"salsa",
|
||||||
"semver",
|
"semver",
|
||||||
"span",
|
"span",
|
||||||
"stdx",
|
|
||||||
"syntax",
|
"syntax",
|
||||||
"tracing",
|
"tracing",
|
||||||
"triomphe",
|
"triomphe",
|
||||||
|
|
@ -638,12 +630,10 @@ dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"cfg",
|
"cfg",
|
||||||
"cov-mark",
|
"cov-mark",
|
||||||
"dashmap 5.5.3",
|
|
||||||
"drop_bomb",
|
"drop_bomb",
|
||||||
"either",
|
"either",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"fst",
|
"fst",
|
||||||
"hashbrown 0.14.5",
|
|
||||||
"hir-expand",
|
"hir-expand",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"intern",
|
"intern",
|
||||||
|
|
@ -652,7 +642,6 @@ dependencies = [
|
||||||
"mbe",
|
"mbe",
|
||||||
"query-group-macro",
|
"query-group-macro",
|
||||||
"ra-ap-rustc_abi",
|
"ra-ap-rustc_abi",
|
||||||
"ra-ap-rustc_hashes",
|
|
||||||
"ra-ap-rustc_parse_format",
|
"ra-ap-rustc_parse_format",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"rustc_apfloat",
|
"rustc_apfloat",
|
||||||
|
|
@ -679,10 +668,8 @@ dependencies = [
|
||||||
"cov-mark",
|
"cov-mark",
|
||||||
"either",
|
"either",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"hashbrown 0.14.5",
|
|
||||||
"intern",
|
"intern",
|
||||||
"itertools",
|
"itertools",
|
||||||
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"mbe",
|
"mbe",
|
||||||
"parser",
|
"parser",
|
||||||
"query-group-macro",
|
"query-group-macro",
|
||||||
|
|
@ -710,7 +697,6 @@ dependencies = [
|
||||||
"chalk-recursive",
|
"chalk-recursive",
|
||||||
"chalk-solve",
|
"chalk-solve",
|
||||||
"cov-mark",
|
"cov-mark",
|
||||||
"dashmap 5.5.3",
|
|
||||||
"either",
|
"either",
|
||||||
"ena",
|
"ena",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
|
|
@ -720,7 +706,6 @@ dependencies = [
|
||||||
"intern",
|
"intern",
|
||||||
"itertools",
|
"itertools",
|
||||||
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"nohash-hasher",
|
|
||||||
"oorandom",
|
"oorandom",
|
||||||
"project-model",
|
"project-model",
|
||||||
"query-group-macro",
|
"query-group-macro",
|
||||||
|
|
@ -951,7 +936,6 @@ dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"cov-mark",
|
"cov-mark",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dashmap 5.5.3",
|
|
||||||
"either",
|
"either",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"fst",
|
"fst",
|
||||||
|
|
@ -1006,9 +990,7 @@ dependencies = [
|
||||||
"hir",
|
"hir",
|
||||||
"ide-db",
|
"ide-db",
|
||||||
"itertools",
|
"itertools",
|
||||||
"nohash-hasher",
|
|
||||||
"parser",
|
"parser",
|
||||||
"stdx",
|
|
||||||
"syntax",
|
"syntax",
|
||||||
"test-fixture",
|
"test-fixture",
|
||||||
"test-utils",
|
"test-utils",
|
||||||
|
|
@ -1206,7 +1188,6 @@ dependencies = [
|
||||||
"ide-db",
|
"ide-db",
|
||||||
"intern",
|
"intern",
|
||||||
"itertools",
|
"itertools",
|
||||||
"paths",
|
|
||||||
"proc-macro-api",
|
"proc-macro-api",
|
||||||
"project-model",
|
"project-model",
|
||||||
"span",
|
"span",
|
||||||
|
|
@ -1284,12 +1265,6 @@ dependencies = [
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lz4_flex"
|
|
||||||
version = "0.11.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matchers"
|
name = "matchers"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -1316,7 +1291,6 @@ dependencies = [
|
||||||
"syntax",
|
"syntax",
|
||||||
"syntax-bridge",
|
"syntax-bridge",
|
||||||
"test-utils",
|
"test-utils",
|
||||||
"tracing",
|
|
||||||
"tt",
|
"tt",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1644,7 +1618,6 @@ dependencies = [
|
||||||
"proc-macro-test",
|
"proc-macro-test",
|
||||||
"ra-ap-rustc_lexer",
|
"ra-ap-rustc_lexer",
|
||||||
"span",
|
"span",
|
||||||
"stdx",
|
|
||||||
"syntax-bridge",
|
"syntax-bridge",
|
||||||
"tt",
|
"tt",
|
||||||
]
|
]
|
||||||
|
|
@ -1767,7 +1740,6 @@ name = "query-group-macro"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"heck",
|
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"salsa",
|
"salsa",
|
||||||
|
|
@ -1960,7 +1932,6 @@ dependencies = [
|
||||||
name = "rust-analyzer"
|
name = "rust-analyzer"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"always-assert",
|
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64",
|
"base64",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
|
|
@ -2292,10 +2263,8 @@ dependencies = [
|
||||||
name = "syntax"
|
name = "syntax"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cov-mark",
|
|
||||||
"either",
|
"either",
|
||||||
"expect-test",
|
"expect-test",
|
||||||
"indexmap",
|
|
||||||
"itertools",
|
"itertools",
|
||||||
"parser",
|
"parser",
|
||||||
"ra-ap-rustc_lexer",
|
"ra-ap-rustc_lexer",
|
||||||
|
|
@ -2321,7 +2290,6 @@ dependencies = [
|
||||||
"stdx",
|
"stdx",
|
||||||
"syntax",
|
"syntax",
|
||||||
"test-utils",
|
"test-utils",
|
||||||
"tracing",
|
|
||||||
"tt",
|
"tt",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2357,7 +2325,6 @@ dependencies = [
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
"stdx",
|
"stdx",
|
||||||
"text-size",
|
"text-size",
|
||||||
"tracing",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ rust-version.workspace = true
|
||||||
[lib]
|
[lib]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lz4_flex = { version = "0.11", default-features = false }
|
|
||||||
|
|
||||||
la-arena.workspace = true
|
la-arena.workspace = true
|
||||||
dashmap.workspace = true
|
dashmap.workspace = true
|
||||||
salsa.workspace = true
|
salsa.workspace = true
|
||||||
|
|
@ -25,7 +23,6 @@ tracing.workspace = true
|
||||||
|
|
||||||
# local deps
|
# local deps
|
||||||
cfg.workspace = true
|
cfg.workspace = true
|
||||||
stdx.workspace = true
|
|
||||||
syntax.workspace = true
|
syntax.workspace = true
|
||||||
vfs.workspace = true
|
vfs.workspace = true
|
||||||
span.workspace = true
|
span.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ rust-version.workspace = true
|
||||||
arrayvec.workspace = true
|
arrayvec.workspace = true
|
||||||
bitflags.workspace = true
|
bitflags.workspace = true
|
||||||
cov-mark = "2.0.0-pre.1"
|
cov-mark = "2.0.0-pre.1"
|
||||||
dashmap.workspace = true
|
|
||||||
drop_bomb = "0.1.5"
|
drop_bomb = "0.1.5"
|
||||||
either.workspace = true
|
either.workspace = true
|
||||||
fst = { version = "0.4.7", default-features = false }
|
fst = { version = "0.4.7", default-features = false }
|
||||||
|
|
@ -25,14 +24,12 @@ la-arena.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
smallvec.workspace = true
|
smallvec.workspace = true
|
||||||
hashbrown.workspace = true
|
|
||||||
triomphe.workspace = true
|
triomphe.workspace = true
|
||||||
rustc_apfloat = "0.2.0"
|
rustc_apfloat = "0.2.0"
|
||||||
text-size.workspace = true
|
text-size.workspace = true
|
||||||
salsa.workspace = true
|
salsa.workspace = true
|
||||||
query-group.workspace = true
|
query-group.workspace = true
|
||||||
|
|
||||||
ra-ap-rustc_hashes.workspace = true
|
|
||||||
ra-ap-rustc_parse_format.workspace = true
|
ra-ap-rustc_parse_format.workspace = true
|
||||||
ra-ap-rustc_abi.workspace = true
|
ra-ap-rustc_abi.workspace = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@ cov-mark = "2.0.0-pre.1"
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
either.workspace = true
|
either.workspace = true
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
la-arena.workspace = true
|
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
hashbrown.workspace = true
|
|
||||||
smallvec.workspace = true
|
smallvec.workspace = true
|
||||||
triomphe.workspace = true
|
triomphe.workspace = true
|
||||||
query-group.workspace = true
|
query-group.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,7 @@ chalk-recursive.workspace = true
|
||||||
chalk-derive.workspace = true
|
chalk-derive.workspace = true
|
||||||
la-arena.workspace = true
|
la-arena.workspace = true
|
||||||
triomphe.workspace = true
|
triomphe.workspace = true
|
||||||
nohash-hasher.workspace = true
|
|
||||||
typed-arena = "2.0.1"
|
typed-arena = "2.0.1"
|
||||||
dashmap.workspace = true
|
|
||||||
indexmap.workspace = true
|
indexmap.workspace = true
|
||||||
rustc_apfloat = "0.2.0"
|
rustc_apfloat = "0.2.0"
|
||||||
query-group.workspace = true
|
query-group.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ rust-version.workspace = true
|
||||||
cov-mark = "2.0.0-pre.1"
|
cov-mark = "2.0.0-pre.1"
|
||||||
crossbeam-channel.workspace = true
|
crossbeam-channel.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
dashmap.workspace = true
|
|
||||||
rayon.workspace = true
|
rayon.workspace = true
|
||||||
fst = { version = "0.4.7", default-features = false }
|
fst = { version = "0.4.7", default-features = false }
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,16 @@ rust-version.workspace = true
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cov-mark = "2.0.0-pre.1"
|
cov-mark = "2.0.0-pre.1"
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
triomphe.workspace = true
|
|
||||||
nohash-hasher.workspace = true
|
|
||||||
|
|
||||||
# local deps
|
# local deps
|
||||||
hir.workspace = true
|
hir.workspace = true
|
||||||
ide-db.workspace = true
|
ide-db.workspace = true
|
||||||
parser.workspace = true
|
parser.workspace = true
|
||||||
stdx.workspace = true
|
|
||||||
syntax.workspace = true
|
syntax.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
expect-test = "1.4.0"
|
expect-test = "1.4.0"
|
||||||
|
triomphe.workspace = true
|
||||||
|
|
||||||
# local deps
|
# local deps
|
||||||
test-utils.workspace = true
|
test-utils.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ tracing.workspace = true
|
||||||
|
|
||||||
hir-expand.workspace = true
|
hir-expand.workspace = true
|
||||||
ide-db.workspace = true
|
ide-db.workspace = true
|
||||||
paths.workspace = true
|
|
||||||
proc-macro-api.workspace = true
|
proc-macro-api.workspace = true
|
||||||
project-model.workspace = true
|
project-model.workspace = true
|
||||||
span.workspace = true
|
span.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,10 @@ rust-version.workspace = true
|
||||||
cov-mark = "2.0.0-pre.1"
|
cov-mark = "2.0.0-pre.1"
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
smallvec.workspace = true
|
smallvec.workspace = true
|
||||||
tracing.workspace = true
|
|
||||||
arrayvec.workspace = true
|
arrayvec.workspace = true
|
||||||
ra-ap-rustc_lexer.workspace = true
|
ra-ap-rustc_lexer.workspace = true
|
||||||
|
|
||||||
# local deps
|
# local deps
|
||||||
syntax.workspace = true
|
|
||||||
parser.workspace = true
|
parser.workspace = true
|
||||||
tt.workspace = true
|
tt.workspace = true
|
||||||
stdx.workspace = true
|
stdx.workspace = true
|
||||||
|
|
@ -31,9 +29,10 @@ syntax-bridge.workspace = true
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
test-utils.workspace = true
|
test-utils.workspace = true
|
||||||
expect-test.workspace = true
|
expect-test.workspace = true
|
||||||
|
syntax.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
in-rust-tree = ["parser/in-rust-tree", "tt/in-rust-tree", "syntax/in-rust-tree"]
|
in-rust-tree = ["parser/in-rust-tree", "tt/in-rust-tree"]
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//! A standalone binary for `proc-macro-srv`.
|
//! A standalone binary for `proc-macro-srv`.
|
||||||
//! Driver for proc macro server
|
//! Driver for proc macro server
|
||||||
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
||||||
|
#![cfg_attr(not(feature = "sysroot-abi"), allow(unused_crate_dependencies))]
|
||||||
#![allow(clippy::print_stderr)]
|
#![allow(clippy::print_stderr)]
|
||||||
|
|
||||||
#[cfg(feature = "in-rust-tree")]
|
#[cfg(feature = "in-rust-tree")]
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,9 @@ rust-version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
object.workspace = true
|
object.workspace = true
|
||||||
libc.workspace = true
|
|
||||||
libloading.workspace = true
|
libloading.workspace = true
|
||||||
memmap2.workspace = true
|
memmap2.workspace = true
|
||||||
|
|
||||||
stdx.workspace = true
|
|
||||||
tt.workspace = true
|
tt.workspace = true
|
||||||
syntax-bridge.workspace = true
|
syntax-bridge.workspace = true
|
||||||
paths.workspace = true
|
paths.workspace = true
|
||||||
|
|
@ -27,6 +25,9 @@ intern.workspace = true
|
||||||
|
|
||||||
ra-ap-rustc_lexer.workspace = true
|
ra-ap-rustc_lexer.workspace = true
|
||||||
|
|
||||||
|
[target.'cfg(unix)'.dependencies]
|
||||||
|
libc.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
expect-test.workspace = true
|
expect-test.workspace = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
//! rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
|
//! rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
|
||||||
|
|
||||||
#![cfg(any(feature = "sysroot-abi", rust_analyzer))]
|
#![cfg(any(feature = "sysroot-abi", rust_analyzer))]
|
||||||
|
#![cfg_attr(not(feature = "sysroot-abi"), allow(unused_crate_dependencies))]
|
||||||
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
||||||
#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
|
#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
|
||||||
#![allow(unreachable_pub, internal_features, clippy::disallowed_types, clippy::print_stderr)]
|
#![allow(unreachable_pub, internal_features, clippy::disallowed_types, clippy::print_stderr)]
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,14 @@ rust-version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
libc.workspace = true
|
|
||||||
jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true }
|
jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true }
|
||||||
|
|
||||||
[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
|
[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
|
||||||
perf-event = "=0.4.7"
|
perf-event = "=0.4.7"
|
||||||
|
|
||||||
|
[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies]
|
||||||
|
libc.workspace = true
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows-sys = { version = "0.59", features = [
|
windows-sys = { version = "0.59", features = [
|
||||||
"Win32_System_Threading",
|
"Win32_System_Threading",
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,10 @@ rust-version.workspace = true
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
heck = "0.5.0"
|
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
syn = { version = "2.0", features = ["full", "extra-traits"] }
|
syn = { version = "2.0", features = ["full", "extra-traits"] }
|
||||||
salsa.workspace = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
expect-test = "1.5.0"
|
expect-test = "1.5.0"
|
||||||
|
salsa.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ tracing-tree.workspace = true
|
||||||
triomphe.workspace = true
|
triomphe.workspace = true
|
||||||
toml = "0.8.8"
|
toml = "0.8.8"
|
||||||
nohash-hasher.workspace = true
|
nohash-hasher.workspace = true
|
||||||
always-assert = "0.2.0"
|
|
||||||
walkdir = "2.3.2"
|
walkdir = "2.3.2"
|
||||||
semver.workspace = true
|
semver.workspace = true
|
||||||
memchr = "2.7.1"
|
memchr = "2.7.1"
|
||||||
|
|
@ -95,9 +94,7 @@ syntax-bridge.workspace = true
|
||||||
[features]
|
[features]
|
||||||
jemalloc = ["jemallocator", "profile/jemalloc"]
|
jemalloc = ["jemallocator", "profile/jemalloc"]
|
||||||
force-always-assert = ["stdx/force-always-assert"]
|
force-always-assert = ["stdx/force-always-assert"]
|
||||||
sysroot-abi = []
|
|
||||||
in-rust-tree = [
|
in-rust-tree = [
|
||||||
"sysroot-abi",
|
|
||||||
"syntax/in-rust-tree",
|
"syntax/in-rust-tree",
|
||||||
"parser/in-rust-tree",
|
"parser/in-rust-tree",
|
||||||
"hir/in-rust-tree",
|
"hir/in-rust-tree",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ use cargo_metadata::PackageId;
|
||||||
use ide::FileId;
|
use ide::FileId;
|
||||||
use ide_db::FxHashMap;
|
use ide_db::FxHashMap;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use nohash_hasher::{IntMap, IntSet};
|
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
use stdx::iter_eq_by;
|
use stdx::iter_eq_by;
|
||||||
use triomphe::Arc;
|
use triomphe::Arc;
|
||||||
|
|
@ -15,7 +14,7 @@ use triomphe::Arc;
|
||||||
use crate::{global_state::GlobalStateSnapshot, lsp, lsp_ext, main_loop::DiagnosticsTaskKind};
|
use crate::{global_state::GlobalStateSnapshot, lsp, lsp_ext, main_loop::DiagnosticsTaskKind};
|
||||||
|
|
||||||
pub(crate) type CheckFixes =
|
pub(crate) type CheckFixes =
|
||||||
Arc<IntMap<usize, FxHashMap<Option<Arc<PackageId>>, IntMap<FileId, Vec<Fix>>>>>;
|
Arc<Vec<FxHashMap<Option<Arc<PackageId>>, FxHashMap<FileId, Vec<Fix>>>>>;
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Default, Clone)]
|
||||||
pub struct DiagnosticsMapConfig {
|
pub struct DiagnosticsMapConfig {
|
||||||
|
|
@ -29,16 +28,16 @@ pub(crate) type DiagnosticsGeneration = usize;
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Default, Clone)]
|
||||||
pub(crate) struct DiagnosticCollection {
|
pub(crate) struct DiagnosticCollection {
|
||||||
// FIXME: should be IntMap<FileId, Vec<ra_id::Diagnostic>>
|
// FIXME: should be FxHashMap<FileId, Vec<ra_id::Diagnostic>>
|
||||||
pub(crate) native_syntax: IntMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
|
pub(crate) native_syntax:
|
||||||
pub(crate) native_semantic: IntMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
|
FxHashMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
|
||||||
|
pub(crate) native_semantic:
|
||||||
|
FxHashMap<FileId, (DiagnosticsGeneration, Vec<lsp_types::Diagnostic>)>,
|
||||||
// FIXME: should be Vec<flycheck::Diagnostic>
|
// FIXME: should be Vec<flycheck::Diagnostic>
|
||||||
pub(crate) check: IntMap<
|
pub(crate) check:
|
||||||
usize,
|
Vec<FxHashMap<Option<Arc<PackageId>>, FxHashMap<FileId, Vec<lsp_types::Diagnostic>>>>,
|
||||||
FxHashMap<Option<Arc<PackageId>>, IntMap<FileId, Vec<lsp_types::Diagnostic>>>,
|
|
||||||
>,
|
|
||||||
pub(crate) check_fixes: CheckFixes,
|
pub(crate) check_fixes: CheckFixes,
|
||||||
changes: IntSet<FileId>,
|
changes: FxHashSet<FileId>,
|
||||||
/// Counter for supplying a new generation number for diagnostics.
|
/// Counter for supplying a new generation number for diagnostics.
|
||||||
/// This is used to keep track of when to clear the diagnostics for a given file as we compute
|
/// This is used to keep track of when to clear the diagnostics for a given file as we compute
|
||||||
/// diagnostics on multiple worker threads simultaneously which may result in multiple diagnostics
|
/// diagnostics on multiple worker threads simultaneously which may result in multiple diagnostics
|
||||||
|
|
@ -55,11 +54,11 @@ pub(crate) struct Fix {
|
||||||
|
|
||||||
impl DiagnosticCollection {
|
impl DiagnosticCollection {
|
||||||
pub(crate) fn clear_check(&mut self, flycheck_id: usize) {
|
pub(crate) fn clear_check(&mut self, flycheck_id: usize) {
|
||||||
let Some(check) = self.check.get_mut(&flycheck_id) else {
|
let Some(check) = self.check.get_mut(flycheck_id) else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
self.changes.extend(check.drain().flat_map(|(_, v)| v.into_keys()));
|
self.changes.extend(check.drain().flat_map(|(_, v)| v.into_keys()));
|
||||||
if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(&flycheck_id) {
|
if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(flycheck_id) {
|
||||||
fixes.clear();
|
fixes.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +66,7 @@ impl DiagnosticCollection {
|
||||||
pub(crate) fn clear_check_all(&mut self) {
|
pub(crate) fn clear_check_all(&mut self) {
|
||||||
Arc::make_mut(&mut self.check_fixes).clear();
|
Arc::make_mut(&mut self.check_fixes).clear();
|
||||||
self.changes.extend(
|
self.changes.extend(
|
||||||
self.check.values_mut().flat_map(|it| it.drain().flat_map(|(_, v)| v.into_keys())),
|
self.check.iter_mut().flat_map(|it| it.drain().flat_map(|(_, v)| v.into_keys())),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,14 +75,14 @@ impl DiagnosticCollection {
|
||||||
flycheck_id: usize,
|
flycheck_id: usize,
|
||||||
package_id: Arc<PackageId>,
|
package_id: Arc<PackageId>,
|
||||||
) {
|
) {
|
||||||
let Some(check) = self.check.get_mut(&flycheck_id) else {
|
let Some(check) = self.check.get_mut(flycheck_id) else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
let package_id = Some(package_id);
|
let package_id = Some(package_id);
|
||||||
if let Some(checks) = check.remove(&package_id) {
|
if let Some(checks) = check.remove(&package_id) {
|
||||||
self.changes.extend(checks.into_keys());
|
self.changes.extend(checks.into_keys());
|
||||||
}
|
}
|
||||||
if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(&flycheck_id) {
|
if let Some(fixes) = Arc::make_mut(&mut self.check_fixes).get_mut(flycheck_id) {
|
||||||
fixes.remove(&package_id);
|
fixes.remove(&package_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,10 +101,10 @@ impl DiagnosticCollection {
|
||||||
diagnostic: lsp_types::Diagnostic,
|
diagnostic: lsp_types::Diagnostic,
|
||||||
fix: Option<Box<Fix>>,
|
fix: Option<Box<Fix>>,
|
||||||
) {
|
) {
|
||||||
let diagnostics = self
|
if self.check.len() <= flycheck_id {
|
||||||
.check
|
self.check.resize_with(flycheck_id + 1, Default::default);
|
||||||
.entry(flycheck_id)
|
}
|
||||||
.or_default()
|
let diagnostics = self.check[flycheck_id]
|
||||||
.entry(package_id.clone())
|
.entry(package_id.clone())
|
||||||
.or_default()
|
.or_default()
|
||||||
.entry(file_id)
|
.entry(file_id)
|
||||||
|
|
@ -118,9 +117,10 @@ impl DiagnosticCollection {
|
||||||
|
|
||||||
if let Some(fix) = fix {
|
if let Some(fix) = fix {
|
||||||
let check_fixes = Arc::make_mut(&mut self.check_fixes);
|
let check_fixes = Arc::make_mut(&mut self.check_fixes);
|
||||||
check_fixes
|
if check_fixes.len() <= flycheck_id {
|
||||||
.entry(flycheck_id)
|
check_fixes.resize_with(flycheck_id + 1, Default::default);
|
||||||
.or_default()
|
}
|
||||||
|
check_fixes[flycheck_id]
|
||||||
.entry(package_id.clone())
|
.entry(package_id.clone())
|
||||||
.or_default()
|
.or_default()
|
||||||
.entry(file_id)
|
.entry(file_id)
|
||||||
|
|
@ -176,14 +176,14 @@ impl DiagnosticCollection {
|
||||||
let native_semantic = self.native_semantic.get(&file_id).into_iter().flat_map(|(_, d)| d);
|
let native_semantic = self.native_semantic.get(&file_id).into_iter().flat_map(|(_, d)| d);
|
||||||
let check = self
|
let check = self
|
||||||
.check
|
.check
|
||||||
.values()
|
.iter()
|
||||||
.flat_map(|it| it.values())
|
.flat_map(|it| it.values())
|
||||||
.filter_map(move |it| it.get(&file_id))
|
.filter_map(move |it| it.get(&file_id))
|
||||||
.flatten();
|
.flatten();
|
||||||
native_syntax.chain(native_semantic).chain(check)
|
native_syntax.chain(native_semantic).chain(check)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn take_changes(&mut self) -> Option<IntSet<FileId>> {
|
pub(crate) fn take_changes(&mut self) -> Option<FxHashSet<FileId>> {
|
||||||
if self.changes.is_empty() {
|
if self.changes.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ use ide_db::base_db::{Crate, ProcMacroPaths, SourceDatabase};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use load_cargo::SourceRootConfig;
|
use load_cargo::SourceRootConfig;
|
||||||
use lsp_types::{SemanticTokens, Url};
|
use lsp_types::{SemanticTokens, Url};
|
||||||
use nohash_hasher::IntMap;
|
|
||||||
use parking_lot::{
|
use parking_lot::{
|
||||||
MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard, RwLockUpgradableReadGuard,
|
MappedRwLockReadGuard, Mutex, RwLock, RwLockReadGuard, RwLockUpgradableReadGuard,
|
||||||
RwLockWriteGuard,
|
RwLockWriteGuard,
|
||||||
|
|
@ -117,7 +116,7 @@ pub(crate) struct GlobalState {
|
||||||
|
|
||||||
// VFS
|
// VFS
|
||||||
pub(crate) loader: Handle<Box<dyn vfs::loader::Handle>, Receiver<vfs::loader::Message>>,
|
pub(crate) loader: Handle<Box<dyn vfs::loader::Handle>, Receiver<vfs::loader::Message>>,
|
||||||
pub(crate) vfs: Arc<RwLock<(vfs::Vfs, IntMap<FileId, LineEndings>)>>,
|
pub(crate) vfs: Arc<RwLock<(vfs::Vfs, FxHashMap<FileId, LineEndings>)>>,
|
||||||
pub(crate) vfs_config_version: u32,
|
pub(crate) vfs_config_version: u32,
|
||||||
pub(crate) vfs_progress_config_version: u32,
|
pub(crate) vfs_progress_config_version: u32,
|
||||||
pub(crate) vfs_done: bool,
|
pub(crate) vfs_done: bool,
|
||||||
|
|
@ -181,7 +180,7 @@ pub(crate) struct GlobalStateSnapshot {
|
||||||
pub(crate) check_fixes: CheckFixes,
|
pub(crate) check_fixes: CheckFixes,
|
||||||
mem_docs: MemDocs,
|
mem_docs: MemDocs,
|
||||||
pub(crate) semantic_tokens_cache: Arc<Mutex<FxHashMap<Url, SemanticTokens>>>,
|
pub(crate) semantic_tokens_cache: Arc<Mutex<FxHashMap<Url, SemanticTokens>>>,
|
||||||
vfs: Arc<RwLock<(vfs::Vfs, IntMap<FileId, LineEndings>)>>,
|
vfs: Arc<RwLock<(vfs::Vfs, FxHashMap<FileId, LineEndings>)>>,
|
||||||
pub(crate) workspaces: Arc<Vec<ProjectWorkspace>>,
|
pub(crate) workspaces: Arc<Vec<ProjectWorkspace>>,
|
||||||
// used to signal semantic highlighting to fall back to syntax based highlighting until
|
// used to signal semantic highlighting to fall back to syntax based highlighting until
|
||||||
// proc-macros have been loaded
|
// proc-macros have been loaded
|
||||||
|
|
@ -265,7 +264,7 @@ impl GlobalState {
|
||||||
discover_sender,
|
discover_sender,
|
||||||
discover_receiver,
|
discover_receiver,
|
||||||
|
|
||||||
vfs: Arc::new(RwLock::new((vfs::Vfs::default(), IntMap::default()))),
|
vfs: Arc::new(RwLock::new((vfs::Vfs::default(), Default::default()))),
|
||||||
vfs_config_version: 0,
|
vfs_config_version: 0,
|
||||||
vfs_progress_config_version: 0,
|
vfs_progress_config_version: 0,
|
||||||
vfs_span: None,
|
vfs_span: None,
|
||||||
|
|
|
||||||
|
|
@ -1465,7 +1465,7 @@ pub(crate) fn handle_code_action(
|
||||||
// Fixes from `cargo check`.
|
// Fixes from `cargo check`.
|
||||||
for fix in snap
|
for fix in snap
|
||||||
.check_fixes
|
.check_fixes
|
||||||
.values()
|
.iter()
|
||||||
.flat_map(|it| it.values())
|
.flat_map(|it| it.values())
|
||||||
.filter_map(|it| it.get(&frange.file_id))
|
.filter_map(|it| it.get(&frange.file_id))
|
||||||
.flatten()
|
.flatten()
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ use std::{
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
use always_assert::always;
|
|
||||||
use crossbeam_channel::{Receiver, select};
|
use crossbeam_channel::{Receiver, select};
|
||||||
use ide_db::base_db::{SourceDatabase, VfsPath, salsa::Database as _};
|
use ide_db::base_db::{SourceDatabase, VfsPath, salsa::Database as _};
|
||||||
use lsp_server::{Connection, Notification, Request};
|
use lsp_server::{Connection, Notification, Request};
|
||||||
|
|
@ -845,7 +844,7 @@ impl GlobalState {
|
||||||
}
|
}
|
||||||
vfs::loader::Message::Progress { n_total, n_done, dir, config_version } => {
|
vfs::loader::Message::Progress { n_total, n_done, dir, config_version } => {
|
||||||
let _p = span!(Level::INFO, "GlobalState::handle_vfs_msg/progress").entered();
|
let _p = span!(Level::INFO, "GlobalState::handle_vfs_msg/progress").entered();
|
||||||
always!(config_version <= self.vfs_config_version);
|
stdx::always!(config_version <= self.vfs_config_version);
|
||||||
|
|
||||||
let (n_done, state) = match n_done {
|
let (n_done, state) = match n_done {
|
||||||
LoadingProgress::Started => {
|
LoadingProgress::Started => {
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,14 @@ rust-version.workspace = true
|
||||||
[dependencies]
|
[dependencies]
|
||||||
backtrace = { version = "0.3.67", optional = true }
|
backtrace = { version = "0.3.67", optional = true }
|
||||||
jod-thread = "0.1.2"
|
jod-thread = "0.1.2"
|
||||||
libc.workspace = true
|
|
||||||
crossbeam-channel.workspace = true
|
crossbeam-channel.workspace = true
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
# Think twice before adding anything here
|
# Think twice before adding anything here
|
||||||
|
|
||||||
|
[target.'cfg(unix)'.dependencies]
|
||||||
|
libc.workspace = true
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
miow = "0.6.0"
|
miow = "0.6.0"
|
||||||
windows-sys = { version = "0.59", features = ["Win32_Foundation"] }
|
windows-sys = { version = "0.59", features = ["Win32_Foundation"] }
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ rust-version.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
tracing.workspace = true
|
|
||||||
|
|
||||||
# local deps
|
# local deps
|
||||||
syntax.workspace = true
|
syntax.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,10 @@ rust-version.workspace = true
|
||||||
[lib]
|
[lib]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cov-mark = "2.0.0-pre.1"
|
|
||||||
either.workspace = true
|
either.workspace = true
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
rowan = "=0.15.15"
|
rowan = "=0.15.15"
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
indexmap.workspace = true
|
|
||||||
smol_str.workspace = true
|
smol_str.workspace = true
|
||||||
triomphe.workspace = true
|
triomphe.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ rust-version.workspace = true
|
||||||
# Avoid adding deps here, this crate is widely used in tests it should compile fast!
|
# Avoid adding deps here, this crate is widely used in tests it should compile fast!
|
||||||
dissimilar = "1.0.7"
|
dissimilar = "1.0.7"
|
||||||
text-size.workspace = true
|
text-size.workspace = true
|
||||||
tracing.workspace = true
|
|
||||||
rustc-hash.workspace = true
|
rustc-hash.workspace = true
|
||||||
|
|
||||||
paths.workspace = true
|
paths.workspace = true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue