bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
376 stars 108 forks source link

Skip Haddock for GHC 8.6.5 #326

Closed parsonsmatt closed 2 years ago

parsonsmatt commented 2 years ago

GHC 8.6.5 is broken with module re-exports. We can either re-export everything, or just skip building Haddock. I'd rather skip building Haddocks for an old GHC than make the code experience worse, or more fragile.

Before submitting your PR, check that you've:

After submitting your PR:

belevy commented 2 years ago

So were just dropping support for haddock in 8.6.5? What is support "policy" for GHC versions?

parsonsmatt commented 2 years ago

Here's the error we get:

esqueleto            >   Missing documentation for:
esqueleto            >     ExprParser (src/Database/Esqueleto/Internal/ExprParser.hs:53)
esqueleto            >     onExpr (src/Database/Esqueleto/Internal/ExprParser.hs:55)
esqueleto            >     skipToEscape (src/Database/Esqueleto/Internal/ExprParser.hs:62)
esqueleto            >     parseEscapedIdentifier (src/Database/Esqueleto/Internal/ExprParser.hs:65)
esqueleto            >     parseTableAccess (src/Database/Esqueleto/Internal/ExprParser.hs:72)
esqueleto            >     parseEscapedChars (src/Database/Esqueleto/Internal/ExprParser.hs:79)
esqueleto            > haddock: internal error: internal: extractDecl
esqueleto            > CallStack (from HasCallStack):
esqueleto            >   error, called at utils/haddock/haddock-api/src/Haddock/Interface/Create.hs:1116:12 in main:Haddock.Interface.Create

It's a Haddock bug that we're somehow getting triggered.

Seems related to this issue, which indicates that Haddock is just broken here for GHC 8.6 (see this comment. The fix is dropping the module re-export and replacing with an explicit export list.

But GHC 8.6.5 itself isn't hard to support, so I'm not terribly worried about keeping it around. If it does become a trouble, then we'll drop it. I think it makes sense to retain support for GHC 8.10.7 until people aren't using it much, which will be a while.

parsonsmatt commented 2 years ago

if anyone is seeing this and wondering why, i'd be happy to accept a PR that just fixes it and re-enables, fwiw