[ty] Fix panic 'missing root' when handling completion request (#20917)

This commit is contained in:
Micha Reiser
2025-10-16 16:23:02 +02:00
committed by GitHub
parent ec9faa34be
commit 058fc37542
5 changed files with 90 additions and 24 deletions

View File

@@ -175,10 +175,7 @@ fn all_submodule_names_for_package<'db>(
// tree. When the revision gets bumped, the cache
// that Salsa creates does for this routine will be
// invalidated.
let root = db
.files()
.root(db, parent_directory)
.expect("System search path should have a registered root");
let root = db.files().expect_root(db, parent_directory);
let _ = root.revision(db);
db.system()