Closed peti closed 4 years ago
Of course this is the same rough issue as https://github.com/Daniel-Diaz/HaTeX/issues/115.
I tend to say we should just remove that pesky test. Randomly-generated LaTeX is just too crazy. I'm all for QuickCheck, but in this case the test cases have no semblance to any real LaTeX code. It would be a lot of work to get the parser working reliably with the auto-generated cases, but even then I doubt it would really improve the real-world reliability.
The error here is that parsing
$gvi>flJua/FCd!dbZxP$\aTvBLTDYif$$
gives you this error:
Left "parseLaTeX input" (line 1, column 35):
unexpected end of input
expecting "$$", text, inline math ($), comment, text2, environment or command
text: Empty input.
@leftaroundabout Yes, I see your point. And we already have the other parsing test in which several hand-written LaTeX files are parsed.
Maybe the problem in this case is a $
-math expression inside another $
-math expression, which is something that shouldn't happen in valid LaTeX code (unless switching to text mode inside the math expression). So the Arbitrary
instance is generating invalid LaTeX code and the parser is complaining about it. Maybe if the LaTeX
type itself didn't allow for this kind of mistake, this wouldn't be a problem. But that's an entirely different topic.
In any case, something should be done about this test, because it keeps failing randomly. Maybe I'll just comment it out.
We've been hit by this problem as well, our CI pipeline fails once a week or so. Would be nice if something could be done about it.
@bidigo well, this should be ok since 9cb9d3d8b817364def0b75a0aeb8fd3c91c23c33, but I guess this is no help for you since it's not yet on Hackage?
@Daniel-Diaz perhaps we should just make a new release.
Yes, a new release would be perfect. We are building with Nix so we could alternatively add a source dependency to a version that includes the commit...
@bidigo @leftaroundabout
I just released HaTeX-3.22.1.0, including the mentioned commit.
@Daniel-Diaz Thank you very much!
Citing from https://hydra.nixos.org/build/107455907: