Skip to content
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

PureScript reporter hides compilation errors in a collapsible section of a warning #282

Open
hobovsky opened this issue Jan 1, 2024 · 1 comment
Labels

Comments

@hobovsky
Copy link

hobovsky commented Jan 1, 2024

See this kumite. Note how a compilation error gets merged with a compilation warning and placed in a collapsible section titled "Warning X of Y".

@kazk
Copy link
Member

kazk commented Jan 3, 2024

The warnings are collapsed by postprocessing stdout with:

stdout.replace(
  /^(Warning \d+ of \d+):\n\n/gm,
  "<LOG::$1>"
);

The error message is grouped inside the last warning because the line "Error found:" doesn't start a new group.

The error message looks like the following:

Error found:
in module ExampleSpec
at test/ExampleSpec.purs:17:34 - 17:35 (line 17, column 34 - line 17, column 35)

  Could not match type
...

If we can assume the error message comes last after all the warnings, we can keep the warnings as is and output everything starting from "Error found:" inside <ERROR::>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants