Skip to content

Conversation

@MichaReiser
Copy link
Member

Summary

This PR updates salsa to pull in salsa-rs/salsa#1010 which fixes two cases where Salsa hangs because it enters an infinite loop when multiple threads are involved in a single fixpoint iteration.

The update also pulls in salsa-rs/salsa#1012 which a) makes the cycle_fn optional if it only returns Iterate, allowing us to remove a ton of code and b) exposes the last provisional value and the query id to the cycle_fn, which should help with #20566

Test Plan

Existing tests

@MichaReiser MichaReiser added bug Something isn't working ty Multi-file analysis & type inference labels Oct 23, 2025
@github-actions
Copy link
Contributor

Diagnostic diff on typing conformance tests

Changes were detected when running ty on typing conformance tests
--- old-output.txt	2025-10-23 07:07:10.810910418 +0000
+++ new-output.txt	2025-10-23 07:07:14.248930801 +0000
@@ -1,5 +1,5 @@
-fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/ef9f932/src/function/execute.rs:402:17 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_type_statement.py`: `PEP695TypeAliasType < 'db >::value_type_(Id(d817)): execute: too many cycle iterations`
-fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/ef9f932/src/function/execute.rs:402:17 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(17c43)): execute: too many cycle iterations`
+fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/d38145c/src/function/execute.rs:417:17 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_type_statement.py`: `PEP695TypeAliasType < 'db >::value_type_(Id(d817)): execute: too many cycle iterations`
+fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/d38145c/src/function/execute.rs:417:17 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(17c43)): execute: too many cycle iterations`
 _directives_deprecated_library.py:15:31: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int`
 _directives_deprecated_library.py:30:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `str`
 _directives_deprecated_library.py:36:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@__add__`

@github-actions
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser marked this pull request as ready for review October 23, 2025 07:25
@MichaReiser MichaReiser merged commit 76a5531 into main Oct 23, 2025
43 checks passed
@MichaReiser MichaReiser deleted the micha/update-salsa-cycle-fn branch October 23, 2025 07:25
@MichaReiser MichaReiser changed the title Fix rare multithreaded related hang [ty] Fix rare multithreaded related hang Oct 23, 2025
@sharkdp
Copy link
Contributor

sharkdp commented Oct 23, 2025

The update also pulls in salsa-rs/salsa#1012 which a) makes the cycle_fn optional if it only returns Iterate, allowing us to remove a ton of code

ohhh 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants