Files
astral-ruff/crates/ty_python_semantic
Douglas Creager eccc6ce4fb [ty] Cache constraint set solutions (#24057)
This adds some salsa-caching to the new constraint set solver. There are
many call paths that build up a constraint set for an assignability
check, and then solve that constraint set to get a specialization, and
we often have to perform this multiple times on the same two types.

It is not just constraint set construction that is worth caching; we
also want to cache as much of the solution extraction as we can. So this
PR refactors the solving code slightly so that `PathBounds` is the
result of the now-salsa-cached method. This is a vec with an element for
each satisfiable path in the constraint set BDD, recording the combined
lower and upper bound for each typevar mentioned on that path. This
caches us much of the work as we can, while still allowing different
callers to provide different `choose` callbacks if they need to override
how to choose a specific type within that lower/upper bound, or if they
need to record additional information about the solution paths.
2026-04-28 10:33:38 -04:00
..
2026-04-15 15:08:55 +00:00