Skip to content

Commit 4612504

Browse files
committed
Make server.syncProjectConfigCache async
1 parent f77e6dd commit 4612504

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ let sendCompilationFinishedMessage = () => {
192192

193193
let debug = false;
194194

195-
let syncProjectConfigCache = (rootPath: string) => {
195+
let syncProjectConfigCache = async (rootPath: string) => {
196196
try {
197197
if (debug) console.log("syncing project config cache for " + rootPath);
198198
await utils.runAnalysisAfterSanityCheck(rootPath, ["cache-project", rootPath]);
@@ -223,7 +223,7 @@ let compilerLogsWatcher = chokidar
223223
if (config.extensionConfiguration.cache?.projectConfig?.enable === true) {
224224
let projectRoot = utils.findProjectRootOfFile(changedPath);
225225
if (projectRoot != null) {
226-
syncProjectConfigCache(projectRoot);
226+
await syncProjectConfigCache(projectRoot);
227227
}
228228
}
229229
} else {
@@ -289,7 +289,7 @@ let openedFile = async (fileUri: string, fileContent: string) => {
289289
compilerLogsWatcher.add(
290290
path.join(projectRootPath, c.buildNinjaPartialPath)
291291
);
292-
syncProjectConfigCache(projectRootPath);
292+
await syncProjectConfigCache(projectRootPath);
293293
}
294294
}
295295
let root = projectsFiles.get(projectRootPath)!;

0 commit comments

Comments
 (0)