M2
M2 copied to clipboard
M2errorRegexp in html.m2 is incorrect
Line 455 is currently
M2errorRegexp := "^[^:\n]+:[0-9]+:[0-9]+:(\\([0-9]+\\)):\\[[0-9]+\\]: "
It should probably say
M2errorRegexp := "^[^:\n]+:[0-9]+:[0-9]+:(\\([0-9]+\\)): "
This fixes an issue where check(Package) doesn't report the actual errors in tests.
Could you give an example of an error message detected by this but not by the other?
I just realized what's causing this issue in check, for some reason error messages from stdio look like this:
stdio:14:1:(3): error: assertion failed
But error messages from files look like this:
ErrorPackage.m2:8:20:(2):[1]: error: assertion failed
And the way tests are run, we get the first format of error message when running tests.
As such, my suggested regexp is also wrong. "^[^:\n]+:[0-9]+:[0-9]+:(\\([0-9]+\\)):(\\[[0-9]+\\]:)? " would probably be more correct, but it might also be a bug in how error messages get printed with stdio.
To test the specific behavior I mentioned, I've attached an example package with two different failing tests. without changing the regexp, I don't get the following line of the output of the first test:
stdio:3:1:(3): error: assertion failed
Was this fixed at some point? I tried check("ErrorPackage"), but it worked correctly (i.e., the check failed).