Skip to content

Commit d793679

Browse files
committed
clean up
1 parent 718a6f7 commit d793679

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

server/src/server.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,11 +1069,7 @@ let updateDiagnosticSyntax = async (
10691069
if (allDiagnostics.length > 0) {
10701070
projectFile.filesWithDiagnostics.add(fileUri);
10711071
} else {
1072-
// Only remove if there are no compiler diagnostics either
1073-
// (compiler diagnostics are tracked separately in filesDiagnostics)
1074-
if (compilerDiagnosticsForFile.length === 0) {
1075-
projectFile.filesWithDiagnostics.delete(fileUri);
1076-
}
1072+
projectFile.filesWithDiagnostics.delete(fileUri);
10771073
}
10781074
}
10791075

@@ -1645,7 +1641,7 @@ async function onMessage(msg: p.Message) {
16451641
// Should never happen, but handle gracefully and log a warning
16461642
console.warn(
16471643
"[ReScript Language Server] Failed to normalize projectRootPath from clientSentBuildAction:",
1648-
msg_.projectRootPath
1644+
msg_.projectRootPath,
16491645
);
16501646
return;
16511647
}

server/src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ export let createFileInTempDir = (extension = "") => {
8383
let findProjectRootOfFileInDir = (
8484
source: NormalizedPath,
8585
): NormalizedPath | null => {
86-
let dirStr = path.dirname(source);
87-
const dir = normalizePath(dirStr);
86+
const dir = normalizePath(path.dirname(source));
8887
if (dir == null) {
8988
return null;
9089
}

0 commit comments

Comments
 (0)