[ty] Update salsa to fix out-of-order query validation#22498
[ty] Update salsa to fix out-of-order query validation#22498MichaReiser merged 1 commit intomainfrom
Conversation
Typing conformance resultsNo changes detected ✅ |
|
|
|
Okay, perf looks pretty neutral. Some of the panics look absolutely terrifying (yay, panics in unsafe code) |
74f1b39 to
f6fbd78
Compare
fb99923 to
044784d
Compare
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
|
|
ouch (perf and memory usage) |
|
But hey, all tests pass |
044784d to
d3b65dc
Compare
|
Okay, this looks less terrible. The memory regression is a bit brutal |
d3b65dc to
c9b6675
Compare
Notably, only on prefect, where we know (from our flaky mypy_primer comments of late) that we encounter some very bad cycles. (Not saying we shouldn't be concerned about the memory regression, just speculating that that's one reason why it might show up especially on prefect, possibly?) |
|
Yeah, I suspect that prefect has some very large cycles. This becomes an issue with the new approach, where we flatten all inputs (reads to tracked struct, inputs, and created interned values) for every cycle head. This leads to a lot of redundant metadata (we no longer get the nice binary-tree memory saving where we only have one dependency when we call a query, instead we flatten that query's dependency too) The memory regression is also already much less terryfing :) |
c9b6675 to
2bb6aa3
Compare
|
The memo metadata increase for prefect is pretty substantial and mainly due to that we store metadata for However, in total, it's only a 1.5% increase. There are other impactful changes that we can make in Salsa to compensate for this increase (within the same revision LRU, immortal durability) Perf looks pretty good now. The simplified |
2bb6aa3 to
d873685
Compare
d873685 to
f403785
Compare
|
I go ahead and merge this. If there are any regression while I'm out, I suggest reverting this bump |
* main: (62 commits) [`refurb`] Do not add `abc.ABC` if already present (`FURB180`) (#22234) [ty] Add a new `assert-type-unspellable-subtype` diagnostic (#22815) [ty] Avoid duplicate syntax errors for `await` outside functions (#22826) [ty] Fix unary operator false-positive for constrained TypeVars (#22783) [ty] Fix binary operator false-positive for constrained TypeVars (#22782) [ty] Fix false-positive `unsupported-operator` for "symmetric" TypeVars (#22756) [`pydocstyle`] Clarify which quote styles are allowed (`D300`) (#22825) [ty] Use distributed versions of AND and OR on constraint sets (#22614) [ty] Add support for dict literals and dict() calls as default values for parameters with TypedDict types (#22161) Document `-` stdin convention in CLI help text (#22817) [ty] Make `infer_subscript_expression_types` a method on `Type` (#22731) [ty] Simplify `OverloadLiteral::spans` and `OverloadLiteral::parameter_span` (#22823) [ty] Require both `*args` and `**kwargs` when calling a `ParamSpec` callable (#22820) [ty] Handle tagged errors in conformance (#22746) Add `--color` cli option to force colored output (#22806) Identify notebooks by LSP didOpen instead of `.ipynb` file extension (#22810) [ty] Fix docstring rendering for literal blocks after doctests (#22676) [ty] Update salsa to fix out-of-order query validation (#22498) [ty] Inline cycle initial and recovery functions (#22814) [ty] Pass the generic context through the decorator (#22544) ...
Summary
Pulls in the changes of salsa-rs/salsa#1061
I believe that this should fix all our known incremental salsa bugs, but I can't say for sure. But I suggest we close them optimistically and open them up again if we keep seeing them in the future.
Fixes astral-sh/ty#992
Fixes astral-sh/ty#1565
Test Plan
cargo test/ mypy primer