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

Add support of 4.09+ multi lines errors in problem matcher #229

Merged
merged 1 commit into from
May 24, 2020

Conversation

Khady
Copy link
Contributor

@Khady Khady commented May 24, 2020

Since ocaml 4.09, when an error covers multiple lines, the message
emitted by the compiler looks like this:

File "robustmatch.ml", lines 33-37, characters 6-23:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(AB, MAB, A)

This commit detects the presence of an eventual end line. Support of
previous version of the compiler or single line errors is preserved.

@mnxn
Copy link
Collaborator

mnxn commented May 24, 2020

Works well for me.
Thank you for the contribution!

@Khady
Copy link
Contributor Author

Khady commented May 24, 2020

I can't reproduce the error of the CI. Not sure why it happens.

@mnxn
Copy link
Collaborator

mnxn commented May 24, 2020

I restarted the workflows, lets see if it works.

The error is There should only be one diagnostic in the Reason source file, which pops up in the CI every once in a while. I'm personally not sure why it happens, but it's not related to this change.

@rgrinberg
Copy link
Contributor

It would be nice to somehow to unit test stuff like this. @mnxn do you know if it's possible?

@mnxn
Copy link
Collaborator

mnxn commented May 24, 2020

It would be nice to somehow to unit test stuff like this. @mnxn do you know if it's possible?

Unfortunately I'm not familiar with a way to do that.

Since ocaml 4.09, when an error covers multiple lines, the message
emitted by the compiler looks like this:

File "robustmatch.ml", lines 33-37, characters 6-23:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(AB, MAB, A)

This commit detects the presence of an eventual end line. Support of
previous version of the compiler or single line errors is preserved.
@rgrinberg rgrinberg merged commit 030c505 into ocamllabs:master May 24, 2020
@rgrinberg
Copy link
Contributor

Thank you for your contribution

@mnxn mnxn mentioned this pull request Nov 2, 2020
@Khady Khady deleted the prob-matcher-409 branch November 2, 2020 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants