yesodweb / shakespeare

Haml-like template files that are compile-time checked
http://www.yesodweb.com/book/shakespearean-templates
MIT License
136 stars 76 forks source link

Test failure with GHC 9 #256

Closed felixonmars closed 3 years ago

felixonmars commented 3 years ago
Failures:

  test/Text/HamletSpec.hs:598:16:
  1) Text.Hamlet non-ascii
       expected: "\1506\1460\1489\1456\1512\1460\1497"
        but got: "\1506\63702\64855\62614\64599\64086\64855\62912railing space \ndollar sign #"

  To rerun use: --match "/Text.Hamlet/non-ascii/"

Randomized with seed 1707026345
snoyberg commented 3 years ago

I don't reproduce

felixonmars commented 3 years ago

It's not 100% reproducible here either. The actual text can change too:

Failures:

  test/Text/HamletSpec.hs:598:16:
  1) Text.Hamlet non-ascii
       expected: "\1506\1460\1489\1456\1512\1460\1497"
        but got: "\1506\63702\64855\62614\64599\64086\64855\62912non-ascii"

  To rerun use: --match "/Text.Hamlet/non-ascii/"

Randomized with seed 1311112565
snoyberg commented 3 years ago

Do you see this with older versions of GHC as well? What OS are you running this on?

felixonmars commented 3 years ago

It's not reproducible with older versions of GHC. The OS is Arch Linux running on x86_64.

snoyberg commented 3 years ago

I'm going to take a guess that it might be a GHC bug, though I can't really be certain. A quick search led to this, which looks similar:

https://www.reddit.com/r/haskell/comments/o52eo6/strange_unicode_behavior_in_ghc_901/

I'll consider this an issue if it repros against 9.0.2.

felixonmars commented 3 years ago

I have tried to apply the fix in https://gitlab.haskell.org/ghc/ghc/-/issues/19976 and this is no longer reproducible.

Thanks for investigating!