Salsify the crate graph

I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
This commit is contained in:
Chayim Refael Friedman 2025-01-02 01:45:32 +02:00
parent 44f18c3d05
commit c94e9efbef
108 changed files with 3630 additions and 2512 deletions

View file

@ -498,9 +498,8 @@ fn module_def_doctest(db: &RootDatabase, def: Definition) -> Option<Runnable> {
};
let krate = def.krate(db);
let edition = krate.map(|it| it.edition(db)).unwrap_or(Edition::CURRENT);
let display_target = krate
.unwrap_or_else(|| (*db.crate_graph().crates_in_topological_order().last().unwrap()).into())
.to_display_target(db);
let display_target =
krate.unwrap_or_else(|| (*db.all_crates().last().unwrap()).into()).to_display_target(db);
if !has_runnable_doc_test(&attrs) {
return None;
}