diff --git a/CHANGELOG.md b/CHANGELOG.md index 3df13a94f..a6b1dda24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ #### :bug: Bug fix +- Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting multiple definitions of the same type or module name https://github.com/rescript-lang/rescript-vscode/pull/1086 + - Fix: incorrect highlighting of `as` inside labelled arguments like `toast` https://github.com/rescript-lang/rescript-vscode/pull/1085 - Fix: bug where incremental analysis does not work when the project folder contains a dot. https://github.com/rescript-lang/rescript-vscode/pull/1080 diff --git a/server/src/incrementalCompilation.ts b/server/src/incrementalCompilation.ts index 4bb824556..0ca5e28d5 100644 --- a/server/src/incrementalCompilation.ts +++ b/server/src/incrementalCompilation.ts @@ -677,8 +677,13 @@ async function compileContents( .filter((d) => { if ( !d.message.startsWith("Uninterpreted extension 'rescript.") && - !d.message.includes( - `/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}` + ( + !d.message.includes( + `/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}` + ) || + // The `Multiple definition of the name ` type error's + // message includes the filepath with LOC of the duplicate definition + d.message.includes("Multiple definition of the") ) ) { hasIgnoredErrorMessages = true;