Skip to content

Commit 191a302

Browse files
More logging
1 parent 062f94e commit 191a302

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

server/src/server.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ let compilerLogsWatcher = chokidar
216216
stabilityThreshold: 1,
217217
},
218218
})
219-
.on("all", (_e, changedPath) => {
220-
console.log("changes in path: ", changedPath);
219+
.on("all", (eventName, changedPath, stats) => {
220+
console.log(eventName, changedPath, stats);
221221
if (changedPath.includes("build.ninja")) {
222222
if (config.extensionConfiguration.cache?.projectConfig?.enable === true) {
223223
console.log("Changed path includes build ninja");
@@ -227,10 +227,16 @@ let compilerLogsWatcher = chokidar
227227
syncProjectConfigCache(projectRoot);
228228
}
229229
}
230+
} else if (
231+
eventName === "unlink" &&
232+
changedPath.includes(".compiler.log")
233+
) {
234+
console.log(".compiler.log has been deleted");
230235
} else {
231236
try {
232237
console.log("Send updated diagnostics");
233238
sendUpdatedDiagnostics();
239+
console.log("Send compilation finished message");
234240
sendCompilationFinishedMessage();
235241
if (config.extensionConfiguration.inlayHints?.enable === true) {
236242
sendInlayHintsRefresh();
@@ -389,6 +395,7 @@ let updateOpenedFile = (fileUri: string, fileContent: string) => {
389395
let filePath = fileURLToPath(fileUri);
390396
assert(stupidFileContentCache.has(filePath));
391397
stupidFileContentCache.set(filePath, fileContent);
398+
console.log(fileUri, fileContent);
392399
if (config.extensionConfiguration.incrementalTypechecking?.enable) {
393400
ic.handleUpdateOpenedFile(filePath, fileContent, send, () => {
394401
if (config.extensionConfiguration.codeLens) {

0 commit comments

Comments
 (0)