diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d27e90ad..be76904de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Fixes: - Fix issue in record field autocomplete not working with type aliases. - Fix issue where autocomplete for local values would not work in the presence of `@react.component` annotations. - Fix issue where the server would crash on large output produced by the binary command. +- Fix issue where the server would crash when a file has a self cycle. ## 1.1.3 diff --git a/server/src/utils.ts b/server/src/utils.ts index 10a6c2787..bc1f9b30c 100644 --- a/server/src/utils.ts +++ b/server/src/utils.ts @@ -389,6 +389,14 @@ export let parseCompilerLogOutput = ( tag: undefined, content: [], }); + } else if (line.startsWith("FAILED:")) { + // File with a self cycle + parsedDiagnostics.push({ + code: undefined, + severity: t.DiagnosticSeverity.Error, + tag: undefined, + content: [line], + }); } else if (line.startsWith(" Warning number ")) { let warningNumber = parseInt(line.slice(" Warning number ".length)); let tag: t.DiagnosticTag | undefined = undefined;