mirror of https://github.com/astral-sh/ruff
[ty] upgrade salsa (#21575)
This commit is contained in:
parent
768bb24cdf
commit
f495c6d4ae
|
|
@ -3588,7 +3588,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa"
|
name = "salsa"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a885bb4c4c192741b8a17418fef81a71e33d111e#a885bb4c4c192741b8a17418fef81a71e33d111e"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=17bc55d699565e5a1cb1bd42363b905af2f9f3e7#17bc55d699565e5a1cb1bd42363b905af2f9f3e7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"boxcar",
|
"boxcar",
|
||||||
"compact_str",
|
"compact_str",
|
||||||
|
|
@ -3612,12 +3612,12 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa-macro-rules"
|
name = "salsa-macro-rules"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a885bb4c4c192741b8a17418fef81a71e33d111e#a885bb4c4c192741b8a17418fef81a71e33d111e"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=17bc55d699565e5a1cb1bd42363b905af2f9f3e7#17bc55d699565e5a1cb1bd42363b905af2f9f3e7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "salsa-macros"
|
name = "salsa-macros"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=a885bb4c4c192741b8a17418fef81a71e33d111e#a885bb4c4c192741b8a17418fef81a71e33d111e"
|
source = "git+https://github.com/salsa-rs/salsa.git?rev=17bc55d699565e5a1cb1bd42363b905af2f9f3e7#17bc55d699565e5a1cb1bd42363b905af2f9f3e7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ regex-automata = { version = "0.4.9" }
|
||||||
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 = "a885bb4c4c192741b8a17418fef81a71e33d111e", default-features = false, features = [
|
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "17bc55d699565e5a1cb1bd42363b905af2f9f3e7", default-features = false, features = [
|
||||||
"compact_str",
|
"compact_str",
|
||||||
"macros",
|
"macros",
|
||||||
"salsa_unstable",
|
"salsa_unstable",
|
||||||
|
|
|
||||||
|
|
@ -113,13 +113,12 @@ pub(crate) fn infer_definition_types<'db>(
|
||||||
|
|
||||||
fn definition_cycle_recover<'db>(
|
fn definition_cycle_recover<'db>(
|
||||||
db: &'db dyn Db,
|
db: &'db dyn Db,
|
||||||
_id: salsa::Id,
|
cycle: &salsa::Cycle,
|
||||||
last_provisional_value: &DefinitionInference<'db>,
|
last_provisional_value: &DefinitionInference<'db>,
|
||||||
value: DefinitionInference<'db>,
|
value: DefinitionInference<'db>,
|
||||||
count: u32,
|
|
||||||
definition: Definition<'db>,
|
definition: Definition<'db>,
|
||||||
) -> DefinitionInference<'db> {
|
) -> DefinitionInference<'db> {
|
||||||
if &value == last_provisional_value || count != ITERATIONS_BEFORE_FALLBACK {
|
if &value == last_provisional_value || cycle.iteration() != ITERATIONS_BEFORE_FALLBACK {
|
||||||
value
|
value
|
||||||
} else {
|
} else {
|
||||||
DefinitionInference::cycle_fallback(definition.scope(db))
|
DefinitionInference::cycle_fallback(definition.scope(db))
|
||||||
|
|
@ -227,13 +226,12 @@ pub(crate) fn infer_isolated_expression<'db>(
|
||||||
|
|
||||||
fn expression_cycle_recover<'db>(
|
fn expression_cycle_recover<'db>(
|
||||||
db: &'db dyn Db,
|
db: &'db dyn Db,
|
||||||
_id: salsa::Id,
|
cycle: &salsa::Cycle,
|
||||||
last_provisional_value: &ExpressionInference<'db>,
|
last_provisional_value: &ExpressionInference<'db>,
|
||||||
value: ExpressionInference<'db>,
|
value: ExpressionInference<'db>,
|
||||||
count: u32,
|
|
||||||
input: InferExpression<'db>,
|
input: InferExpression<'db>,
|
||||||
) -> ExpressionInference<'db> {
|
) -> ExpressionInference<'db> {
|
||||||
if &value == last_provisional_value || count != ITERATIONS_BEFORE_FALLBACK {
|
if &value == last_provisional_value || cycle.iteration() != ITERATIONS_BEFORE_FALLBACK {
|
||||||
value
|
value
|
||||||
} else {
|
} else {
|
||||||
ExpressionInference::cycle_fallback(input.expression(db).scope(db))
|
ExpressionInference::cycle_fallback(input.expression(db).scope(db))
|
||||||
|
|
|
||||||
|
|
@ -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 = "a885bb4c4c192741b8a17418fef81a71e33d111e", default-features = false, features = [
|
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "17bc55d699565e5a1cb1bd42363b905af2f9f3e7", default-features = false, features = [
|
||||||
"compact_str",
|
"compact_str",
|
||||||
"macros",
|
"macros",
|
||||||
"salsa_unstable",
|
"salsa_unstable",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue