Clear query server package cache on dbscheme edits

This commit is contained in:
Kasper Svendsen
2024-06-11 10:55:42 +00:00
parent 12555d90c1
commit 9494d32144

View File

@@ -717,12 +717,13 @@ async function installOrUpdateThenTryActivate(
return undefined; return undefined;
} }
const PACK_GLOBS = [ const CLEAR_PACK_CACHE_ON_EDIT_GLOBS = [
"**/codeql-pack.yml", "**/codeql-pack.yml",
"**/qlpack.yml", "**/qlpack.yml",
"**/queries.xml", "**/queries.xml",
"**/codeql-pack.lock.yml", "**/codeql-pack.lock.yml",
"**/qlpack.lock.yml", "**/qlpack.lock.yml",
"**/*.dbscheme",
".codeqlmanifest.json", ".codeqlmanifest.json",
"codeql-workspace.yml", "codeql-workspace.yml",
]; ];
@@ -769,7 +770,7 @@ async function activateWithInstalledDistribution(
ctx, ctx,
); );
for (const glob of PACK_GLOBS) { for (const glob of CLEAR_PACK_CACHE_ON_EDIT_GLOBS) {
const fsWatcher = workspace.createFileSystemWatcher(glob); const fsWatcher = workspace.createFileSystemWatcher(glob);
ctx.subscriptions.push(fsWatcher); ctx.subscriptions.push(fsWatcher);