Skip to content

Commit aca332d

Browse files
authored
As part of incremental type checking, when filtering out potentially unwanted parser errors, don't ignore the multiple definitions type error (#1086)
* As part of incremental type checking, when filtering out potentially unwanted parser errors, don't ignore the multiple definitions type error * Added CHANGELOG entry
1 parent 1bf87b3 commit aca332d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#### :bug: Bug fix
1616

17+
- 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
18+
1719
- Fix: incorrect highlighting of `as` inside labelled arguments like `toast` https://github.com/rescript-lang/rescript-vscode/pull/1085
1820

1921
- Fix: bug where incremental analysis does not work when the project folder contains a dot. https://github.com/rescript-lang/rescript-vscode/pull/1080

server/src/incrementalCompilation.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,13 @@ async function compileContents(
677677
.filter((d) => {
678678
if (
679679
!d.message.startsWith("Uninterpreted extension 'rescript.") &&
680-
!d.message.includes(
681-
`/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}`
680+
(
681+
!d.message.includes(
682+
`/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}`
683+
) ||
684+
// The `Multiple definition of the <kind> name <name>` type error's
685+
// message includes the filepath with LOC of the duplicate definition
686+
d.message.includes("Multiple definition of the")
682687
)
683688
) {
684689
hasIgnoredErrorMessages = true;

0 commit comments

Comments
 (0)