ruff/crates/ty
Ibraheem Ahmed 8531f4b3ca
[ty] Add infrastructure for AST garbage collection (#18445)
## Summary

https://github.com/astral-sh/ty/issues/214 will require a couple
invasive changes that I would like to get merged even before garbage
collection is fully implemented (to avoid rebasing):
- `ParsedModule` can no longer be dereferenced directly. Instead you
need to load a `ParsedModuleRef` to access the AST, which requires a
reference to the salsa database (as it may require re-parsing the AST if
it was collected).
- `AstNodeRef` can only be dereferenced with the `node` method, which
takes a reference to the `ParsedModuleRef`. This allows us to encode the
fact that ASTs do not live as long as the database and may be collected
as soon a given instance of a `ParsedModuleRef` is dropped. There are a
number of places where we currently merge the `'db` and `'ast`
lifetimes, so this requires giving some types/functions two separate
lifetime parameters.
2025-06-05 11:43:18 -04:00
..
docs [ty] Only calculate information for unresolved-reference subdiagnostic if we know we'll emit the diagnostic (#18465) 2025-06-04 20:41:00 +01:00
src [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00
tests [ty] Fix --python argument for Windows, and improve error messages for bad --python arguments (#18457) 2025-06-05 08:19:15 +01:00
build.rs Parse dist-workspace.toml for version (#17868) 2025-05-06 12:18:17 +00:00
Cargo.toml [ty] Infer the Python version from the environment if feasible (#18057) 2025-05-30 21:22:51 +00:00
CONTRIBUTING.md [ty] contribution guide (#18061) 2025-05-13 10:55:01 +02:00
README.md [ty] contribution guide (#18061) 2025-05-13 10:55:01 +02:00

ty

ty is an extremely fast type checker. Currently, it is a work-in-progress and not ready for production use.

The Rust code for ty lives in this repository; see CONTRIBUTING.md for more information on contributing to ty.

See the ty repo for ty documentation and releases.