UU-ComputerScience / uuagc

3 stars 9 forks source link

uuagc stuck in infinite loop when compiled with GHC 9.8 #15

Closed noughtmare closed 1 week ago

noughtmare commented 1 month ago

Whenever I try to compile my packages they get stuck at configuring.

To reproduce:

  1. git clone https://github.com/noughtmare/uuagc-constant-folding.git
  2. cd uuagc-constant-folding
  3. cabal build --allow-newer
  4. watch it get stuck at Configuring uuagc-constant-folding-0.1.0.0...

The same happens for my other example: ag-generalized-traversals

noughtmare commented 1 month ago

@FPtje does the latest version work properly for you?

noughtmare commented 1 month ago

Actually, it seems uuagc-0.9.56 might be the culprit, I'll try older versions.

Edit: 0.9.55 also seems to get stuck.

noughtmare commented 1 month ago

OK, this is super weird. If I compile uuagc with GHC 9.8.2 then it gets stuck, but if I compile it with GHC 8.10.7 then it works fine. Is this a GHC bug?

FPtje commented 1 month ago

The latest version did work well with me on GHC 9.6.

Would it be possible to enable some verbose mode? That might give some more hints as to what is going on.

I haven't tried to build any UUAGC stuff with 9.8. If that doesn't work yet, 9.6 should be the latest version that works.

noughtmare commented 1 month ago

Indeed, 9.6 also works for me. I see there is a --verbose flag for uuagc, but that does not seem to do anything in this case and the description makes it seem that it only affects error messages it prints.

jbransen commented 1 week ago

I can indeed reproduce this when compiling uuagc with GHC 9.8. I looked into this a bit, I have not traced the full bug yet, but I am quite certain that it is the call to parse, from uulib which hangs. So, I suspect that the parsing library does something lazy which has become slightly stricter in GHC 9.8....

jbransen commented 1 week ago

Yep, this is actually a uulib issue: https://github.com/UU-ComputerScience/uulib/issues/11

jbransen commented 1 week ago

The release of https://hackage.haskell.org/package/uulib-0.9.25 should have fixed this, could you confirm? I did not update version bounds on uuagc, but you could of course in the project itself make sure that the newest uulib is used.

noughtmare commented 1 week ago

Yes, it works now!