Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

HaTeX-3.21.0.0 test suite failure #144

Closed
peti opened this issue Nov 29, 2019 · 7 comments
Closed

HaTeX-3.21.0.0 test suite failure #144

peti opened this issue Nov 29, 2019 · 7 comments

Comments

@peti
Copy link

peti commented Nov 29, 2019

Citing from https://hydra.nixos.org/build/107455907:

Test suite hatex-test: RUNNING...
HaTeX
  LaTeX
    LaTeX mempty:        OK
      +++ OK, passed 100 tests.
    LaTeX mappend:       OK (0.02s)
      +++ OK, passed 100 tests.
  Parser
    render . parse = id: FAIL
      *** Failed! Falsified (after 32 tests):
      TeXMath Dollar (TeXSeq (TeXRaw "gvi>flJua/FCd!dbZxP") (TeXMath Dollar (TeXCommS "aTvBLTDYif")))
      Use --quickcheck-replay=67509 to reproduce.

1 out of 3 tests failed (0.03s)
Test suite hatex-test: FAIL
@leftaroundabout
Copy link
Collaborator

Of course this is the same rough issue as #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.

@Daniel-Diaz
Copy link
Owner

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.

@bidigo
Copy link

bidigo commented Mar 2, 2020

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.

@leftaroundabout
Copy link
Collaborator

@bidigo well, this should be ok since 9cb9d3d, 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.

@bidigo
Copy link

bidigo commented Mar 2, 2020

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...

@Daniel-Diaz
Copy link
Owner

@bidigo @leftaroundabout

I just released HaTeX-3.22.1.0, including the mentioned commit.

@bidigo
Copy link

bidigo commented Mar 4, 2020

@Daniel-Diaz Thank you very much!

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

No branches or pull requests

4 participants