Skip to content

Don't filter out module-related type errors #1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2025
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
Contributor 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