mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-08 17:41:31 +00:00
[ty] Make Module
a Salsa ingredient
We want to write queries that depend on `Module` for caching. While it seems it can be done without making `Module` an ingredient, it seems it is best practice to do so. [best practice to do so]: https://github.com/astral-sh/ruff/pull/19408#discussion_r2215867301
This commit is contained in:
parent
905b9d7f51
commit
4573a0f6a0
24 changed files with 258 additions and 253 deletions
|
@ -1278,7 +1278,7 @@ impl<'ast> Visitor<'ast> for SemanticIndexBuilder<'_, 'ast> {
|
|||
continue;
|
||||
};
|
||||
|
||||
let Some(referenced_module) = module.file() else {
|
||||
let Some(referenced_module) = module.file(self.db) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ impl<'db> Visitor<'db> for ExportFinder<'db> {
|
|||
.iter()
|
||||
.flat_map(|module| {
|
||||
module
|
||||
.file()
|
||||
.file(self.db)
|
||||
.map(|file| exported_names(self.db, file))
|
||||
.unwrap_or_default()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue