Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 module-related type errors https://github.com/rescript-lang/rescript-vscode/pull/1090

- 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
Expand Down
7 changes: 6 additions & 1 deletion server/src/incrementalCompilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,12 @@ async function compileContents(
) ||
// The `Multiple definition of the <kind> name <name>` type error's
// message includes the filepath with LOC of the duplicate definition
d.message.includes("Multiple definition of the")
d.message.startsWith("Multiple definition of the") ||
// The signature mismatch, with mismatch and ill typed applicative functor
// type errors all include the filepath with LOC
d.message.startsWith("Signature mismatch") ||
d.message.startsWith("In this `with' constraint") ||
d.message.startsWith("This `with' constraint on")
Comment on lines +686 to +691
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of manually baking in these conditions, we could instead check for stderr.trimStart().startsWith("We've found a bug for you") 🤔

)
) {
hasIgnoredErrorMessages = true;
Expand Down