mirror of https://github.com/astral-sh/ruff
## 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. |
||
|---|---|---|
| .. | ||
| comments | ||
| expression | ||
| module | ||
| other | ||
| pattern | ||
| snapshots | ||
| statement | ||
| string | ||
| type_param | ||
| builders.rs | ||
| cli.rs | ||
| context.rs | ||
| db.rs | ||
| generated.rs | ||
| lib.rs | ||
| main.rs | ||
| options.rs | ||
| prelude.rs | ||
| preview.rs | ||
| range.rs | ||
| shared_traits.rs | ||
| verbatim.rs | ||