From c8f056a6db1b145845c687aac1fd40cd62b0d6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Wed, 9 Feb 2022 09:19:57 +0200 Subject: [PATCH] Revert "Revert "Bump dashmap"" This reverts commit 39674cd35054f4905691bb0c3d1eca7b97063aa7. --- Cargo.lock | 101 ++++++++++++++++++++++++++++---- crates/hir_def/Cargo.toml | 4 +- crates/hir_def/src/intern.rs | 11 +++- crates/rust-analyzer/Cargo.toml | 2 +- 4 files changed, 102 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 847d356aa9..320671d5f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,7 +227,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03746e0c6dd9b5d2d9132ffe0bede35fb5f815604fd371bb42599fd37bc8e483" dependencies = [ - "dashmap", + "dashmap 4.0.2", "once_cell", "rustc-hash", ] @@ -301,6 +301,17 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "dashmap" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0834a35a3fce649144119e18da2a4d8ed12ef3862f47183fd46f625d072d96c" +dependencies = [ + "cfg-if", + "num_cpus", + "parking_lot 0.12.0", +] + [[package]] name = "derive_arbitrary" version = "1.0.2" @@ -496,7 +507,7 @@ dependencies = [ "base_db", "cfg", "cov-mark", - "dashmap", + "dashmap 5.1.0", "drop_bomb", "either", "expect-test", @@ -506,8 +517,10 @@ dependencies = [ "itertools", "la-arena", "limit", + "lock_api", "mbe", "once_cell", + "parking_lot 0.12.0", "profile", "rustc-hash", "smallvec", @@ -987,7 +1000,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7377f7792b3afb6a3cba68daa54ca23c032137010460d667fda53a8d66be00e" dependencies = [ - "windows-sys", + "windows-sys 0.28.0", ] [[package]] @@ -1065,7 +1078,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.1", ] [[package]] @@ -1082,6 +1105,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.32.0", +] + [[package]] name = "parser" version = "0.0.0" @@ -1357,7 +1393,7 @@ dependencies = [ "mimalloc", "num_cpus", "oorandom", - "parking_lot", + "parking_lot 0.12.0", "proc_macro_api", "proc_macro_srv", "profile", @@ -1423,7 +1459,7 @@ dependencies = [ "lock_api", "log", "oorandom", - "parking_lot", + "parking_lot 0.11.2", "rustc-hash", "salsa-macros", "smallvec", @@ -1931,11 +1967,24 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82ca39602d5cbfa692c4b67e3bcbb2751477355141c1ed434c94da4186836ff6" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.28.0", + "windows_i686_gnu 0.28.0", + "windows_i686_msvc 0.28.0", + "windows_x86_64_gnu 0.28.0", + "windows_x86_64_msvc 0.28.0", +] + +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc 0.32.0", + "windows_i686_gnu 0.32.0", + "windows_i686_msvc 0.32.0", + "windows_x86_64_gnu 0.32.0", + "windows_x86_64_msvc 0.32.0", ] [[package]] @@ -1944,30 +1993,60 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52695a41e536859d5308cc613b4a022261a274390b25bd29dfff4bf08505f3c2" +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + [[package]] name = "windows_i686_gnu" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f54725ac23affef038fecb177de6c9bf065787c2f432f79e3c373da92f3e1d8a" +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + [[package]] name = "windows_i686_msvc" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d5158a43cc43623c0729d1ad6647e62fa384a3d135fd15108d37c683461f64" +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + [[package]] name = "windows_x86_64_gnu" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc31f409f565611535130cfe7ee8e6655d3fa99c1c61013981e491921b5ce954" +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + [[package]] name = "windows_x86_64_msvc" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f2b8c7cbd3bfdddd9ab98769f9746a7fad1bca236554cd032b78d768bc0e89f" +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "write-json" version = "0.1.2" diff --git a/crates/hir_def/Cargo.toml b/crates/hir_def/Cargo.toml index 0fca025e18..794f92b233 100644 --- a/crates/hir_def/Cargo.toml +++ b/crates/hir_def/Cargo.toml @@ -11,7 +11,9 @@ doctest = false [dependencies] cov-mark = "2.0.0-pre.1" -dashmap = { version = "4.0.2", features = ["raw-api"] } +dashmap = { version = "5.0", features = ["raw-api"] } +lock_api = "0.4" +parking_lot = "0.12" tracing = "0.1" once_cell = "1.3.1" rustc-hash = "1.1.0" diff --git a/crates/hir_def/src/intern.rs b/crates/hir_def/src/intern.rs index 79ba970e7b..f5a4f5ec4e 100644 --- a/crates/hir_def/src/intern.rs +++ b/crates/hir_def/src/intern.rs @@ -10,15 +10,20 @@ use std::{ sync::Arc, }; -use dashmap::{lock::RwLockWriteGuard, DashMap, SharedValue}; +use dashmap::{DashMap, SharedValue}; +use lock_api::RwLockWriteGuard; use once_cell::sync::OnceCell; +use parking_lot::RawRwLock; use rustc_hash::FxHasher; use crate::generics::GenericParams; type InternMap = DashMap, (), BuildHasherDefault>; -type Guard = - RwLockWriteGuard<'static, HashMap, SharedValue<()>, BuildHasherDefault>>; +type Guard = RwLockWriteGuard< + 'static, + RawRwLock, + HashMap, SharedValue<()>, BuildHasherDefault>, +>; pub struct Interned { arc: Arc, diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 014001397d..a1db6f59a6 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml @@ -23,7 +23,7 @@ crossbeam-channel = "0.5.0" dissimilar = "1.0.2" itertools = "0.10.0" lsp-types = { version = "0.91", features = ["proposed"] } -parking_lot = "0.11.0" +parking_lot = "0.12" xflags = "0.2.1" oorandom = "11.1.2" rustc-hash = "1.1.0"