mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:18 +00:00
Update salsa past generational id change (#18362)
This commit is contained in:
parent
0c29e258c6
commit
8005ebb405
5 changed files with 31 additions and 14 deletions
29
Cargo.lock
generated
29
Cargo.lock
generated
|
@ -8,6 +8,18 @@ version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ahash"
|
||||||
|
version = "0.8.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"once_cell",
|
||||||
|
"version_check",
|
||||||
|
"zerocopy",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
version = "1.1.3"
|
version = "1.1.3"
|
||||||
|
@ -1106,6 +1118,10 @@ name = "hashbrown"
|
||||||
version = "0.14.5"
|
version = "0.14.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
||||||
|
dependencies = [
|
||||||
|
"ahash",
|
||||||
|
"allocator-api2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
|
@ -3177,13 +3193,14 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa"
|
name = "salsa"
|
||||||
version = "0.21.1"
|
version = "0.22.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=4818b15f3b7516555d39f5a41cb75970448bee4c#4818b15f3b7516555d39f5a41cb75970448bee4c"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=40d7844a7a7449a136e0946920a678b55a82f30b#40d7844a7a7449a136e0946920a678b55a82f30b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"boxcar",
|
"boxcar",
|
||||||
"compact_str",
|
"compact_str",
|
||||||
"crossbeam-queue",
|
"crossbeam-queue",
|
||||||
"dashmap 6.1.0",
|
"dashmap 6.1.0",
|
||||||
|
"hashbrown 0.14.5",
|
||||||
"hashbrown 0.15.3",
|
"hashbrown 0.15.3",
|
||||||
"hashlink",
|
"hashlink",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
@ -3200,13 +3217,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa-macro-rules"
|
name = "salsa-macro-rules"
|
||||||
version = "0.21.1"
|
version = "0.22.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=4818b15f3b7516555d39f5a41cb75970448bee4c#4818b15f3b7516555d39f5a41cb75970448bee4c"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=40d7844a7a7449a136e0946920a678b55a82f30b#40d7844a7a7449a136e0946920a678b55a82f30b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa-macros"
|
name = "salsa-macros"
|
||||||
version = "0.21.1"
|
version = "0.22.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=4818b15f3b7516555d39f5a41cb75970448bee4c#4818b15f3b7516555d39f5a41cb75970448bee4c"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=40d7844a7a7449a136e0946920a678b55a82f30b#40d7844a7a7449a136e0946920a678b55a82f30b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
|
@ -129,7 +129,7 @@ regex = { version = "1.10.2" }
|
||||||
rustc-hash = { version = "2.0.0" }
|
rustc-hash = { version = "2.0.0" }
|
||||||
rustc-stable-hash = { version = "0.1.2" }
|
rustc-stable-hash = { version = "0.1.2" }
|
||||||
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
|
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
|
||||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "4818b15f3b7516555d39f5a41cb75970448bee4c" }
|
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "40d7844a7a7449a136e0946920a678b55a82f30b" }
|
||||||
schemars = { version = "0.8.16" }
|
schemars = { version = "0.8.16" }
|
||||||
seahash = { version = "4.1.0" }
|
seahash = { version = "4.1.0" }
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
serde = { version = "1.0.197", features = ["derive"] }
|
||||||
|
|
|
@ -13,12 +13,12 @@ pub fn assert_function_query_was_not_run<Db, Q, QDb, I, R>(
|
||||||
Q: Fn(QDb, I) -> R,
|
Q: Fn(QDb, I) -> R,
|
||||||
I: salsa::plumbing::AsId + std::fmt::Debug + Copy,
|
I: salsa::plumbing::AsId + std::fmt::Debug + Copy,
|
||||||
{
|
{
|
||||||
let id = input.as_id().as_u32();
|
let id = input.as_id();
|
||||||
let (query_name, will_execute_event) = find_will_execute_event(db, query, input, events);
|
let (query_name, will_execute_event) = find_will_execute_event(db, query, input, events);
|
||||||
|
|
||||||
db.attach(|_| {
|
db.attach(|_| {
|
||||||
if let Some(will_execute_event) = will_execute_event {
|
if let Some(will_execute_event) = will_execute_event {
|
||||||
panic!("Expected query {query_name}({id}) not to have run but it did: {will_execute_event:?}\n\n{events:#?}");
|
panic!("Expected query {query_name}({id:?}) not to have run but it did: {will_execute_event:?}\n\n{events:#?}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ pub fn assert_function_query_was_run<Db, Q, QDb, I, R>(
|
||||||
Q: Fn(QDb, I) -> R,
|
Q: Fn(QDb, I) -> R,
|
||||||
I: salsa::plumbing::AsId + std::fmt::Debug + Copy,
|
I: salsa::plumbing::AsId + std::fmt::Debug + Copy,
|
||||||
{
|
{
|
||||||
let id = input.as_id().as_u32();
|
let id = input.as_id();
|
||||||
let (query_name, will_execute_event) = find_will_execute_event(db, query, input, events);
|
let (query_name, will_execute_event) = find_will_execute_event(db, query, input, events);
|
||||||
|
|
||||||
db.attach(|_| {
|
db.attach(|_| {
|
||||||
|
@ -224,7 +224,7 @@ fn query_was_not_run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "Expected query len(0) not to have run but it did:")]
|
#[should_panic(expected = "Expected query len(Id(0)) not to have run but it did:")]
|
||||||
fn query_was_not_run_fails_if_query_was_run() {
|
fn query_was_not_run_fails_if_query_was_run() {
|
||||||
use crate::tests::TestDb;
|
use crate::tests::TestDb;
|
||||||
use salsa::prelude::*;
|
use salsa::prelude::*;
|
||||||
|
@ -287,7 +287,7 @@ fn const_query_was_not_run_fails_if_query_was_run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "Expected query len(0) to have run but it did not:")]
|
#[should_panic(expected = "Expected query len(Id(0)) to have run but it did not:")]
|
||||||
fn query_was_run_fails_if_query_was_not_run() {
|
fn query_was_run_fails_if_query_was_not_run() {
|
||||||
use crate::tests::TestDb;
|
use crate::tests::TestDb;
|
||||||
use salsa::prelude::*;
|
use salsa::prelude::*;
|
||||||
|
|
|
@ -9189,7 +9189,7 @@ impl<'db> BoundSuperType<'db> {
|
||||||
// Make sure that the `Type` enum does not grow unexpectedly.
|
// Make sure that the `Type` enum does not grow unexpectedly.
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
static_assertions::assert_eq_size!(Type, [u8; 16]);
|
static_assertions::assert_eq_size!(Type, [u8; 24]);
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(crate) mod tests {
|
pub(crate) mod tests {
|
||||||
|
|
|
@ -30,7 +30,7 @@ ty_python_semantic = { path = "../crates/ty_python_semantic" }
|
||||||
ty_vendored = { path = "../crates/ty_vendored" }
|
ty_vendored = { path = "../crates/ty_vendored" }
|
||||||
|
|
||||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer", default-features = false }
|
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer", default-features = false }
|
||||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "4818b15f3b7516555d39f5a41cb75970448bee4c" }
|
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "40d7844a7a7449a136e0946920a678b55a82f30b" }
|
||||||
similar = { version = "2.5.0" }
|
similar = { version = "2.5.0" }
|
||||||
tracing = { version = "0.1.40" }
|
tracing = { version = "0.1.40" }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue