internal: Update dashmap and freeze its version

This commit is contained in:
Lukas Wirth 2022-06-10 15:59:46 +02:00
parent 0be31d945e
commit 0cf677ab42
3 changed files with 20 additions and 23 deletions

12
Cargo.lock generated
View file

@ -294,13 +294,14 @@ dependencies = [
[[package]] [[package]]
name = "dashmap" name = "dashmap"
version = "5.2.0" version = "5.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c8858831f7781322e539ea39e72449c46b059638250c14344fec8d0aa6e539c" checksum = "3495912c9c1ccf2e18976439f4443f3fee0fd61f424ff99fde6a66b15ecb448f"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"num_cpus", "hashbrown 0.12.1",
"parking_lot 0.12.0", "lock_api",
"parking_lot_core 0.9.3",
] ]
[[package]] [[package]]
@ -505,15 +506,14 @@ dependencies = [
"either", "either",
"expect-test", "expect-test",
"fst", "fst",
"hashbrown 0.12.1",
"hir-expand", "hir-expand",
"indexmap", "indexmap",
"itertools", "itertools",
"la-arena", "la-arena",
"limit", "limit",
"lock_api",
"mbe", "mbe",
"once_cell", "once_cell",
"parking_lot 0.12.0",
"profile", "profile",
"rustc-hash", "rustc-hash",
"smallvec", "smallvec",

View file

@ -10,23 +10,23 @@ rust-version = "1.57"
doctest = false doctest = false
[dependencies] [dependencies]
anymap = "0.12.1"
arrayvec = "0.7.2"
bitflags = "1.3.2" bitflags = "1.3.2"
cov-mark = "2.0.0-pre.1" cov-mark = "2.0.0-pre.1"
dashmap = { version = "5.2.0", features = ["raw-api"] } # We need to freeze the version of the crate, as the raw-api feature is considered unstable
lock_api = "0.4.6" dashmap = { version = "=5.3.4", features = ["raw-api"] }
parking_lot = "0.12.0" drop_bomb = "0.1.5"
tracing = "0.1.32" either = "1.6.1"
fst = { version = "0.4.7", default-features = false }
hashbrown = { version = "0.12.1", default-features = false }
indexmap = "1.8.0"
itertools = "0.10.3"
la-arena = { version = "0.3.0", path = "../../lib/la-arena" }
once_cell = "1.10.0" once_cell = "1.10.0"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
either = "1.6.1"
anymap = "0.12.1"
drop_bomb = "0.1.5"
fst = { version = "0.4.7", default-features = false }
itertools = "0.10.3"
indexmap = "1.8.0"
smallvec = "1.8.0" smallvec = "1.8.0"
arrayvec = "0.7.2" tracing = "0.1.32"
la-arena = { version = "0.3.0", path = "../../lib/la-arena" }
stdx = { path = "../stdx", version = "0.0.0" } stdx = { path = "../stdx", version = "0.0.0" }
base-db = { path = "../base-db", version = "0.0.0" } base-db = { path = "../base-db", version = "0.0.0" }

View file

@ -3,7 +3,6 @@
//! Eventually this should probably be replaced with salsa-based interning. //! Eventually this should probably be replaced with salsa-based interning.
use std::{ use std::{
collections::HashMap,
fmt::{self, Debug, Display}, fmt::{self, Debug, Display},
hash::{BuildHasherDefault, Hash, Hasher}, hash::{BuildHasherDefault, Hash, Hasher},
ops::Deref, ops::Deref,
@ -11,17 +10,15 @@ use std::{
}; };
use dashmap::{DashMap, SharedValue}; use dashmap::{DashMap, SharedValue};
use lock_api::RwLockWriteGuard; use hashbrown::HashMap;
use once_cell::sync::OnceCell; use once_cell::sync::OnceCell;
use parking_lot::RawRwLock;
use rustc_hash::FxHasher; use rustc_hash::FxHasher;
use crate::generics::GenericParams; use crate::generics::GenericParams;
type InternMap<T> = DashMap<Arc<T>, (), BuildHasherDefault<FxHasher>>; type InternMap<T> = DashMap<Arc<T>, (), BuildHasherDefault<FxHasher>>;
type Guard<T> = RwLockWriteGuard< type Guard<T> = dashmap::RwLockWriteGuard<
'static, 'static,
RawRwLock,
HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>, HashMap<Arc<T>, SharedValue<()>, BuildHasherDefault<FxHasher>>,
>; >;