hspec / HUnit

A unit testing framework for Haskell

Home Page:http://hackage.haskell.org/package/HUnit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revise HUnit 1.4.0.0 through 1.6.1.0 to disallow building with GHC <7.4

RyanGlScott opened this issue · comments

The CI for bifunctors (which depends on hspec, which in turn depends on HUnit) is currently failing on pre-7.4 versions of GHC. Here is an example:

Failed to build HUnit-1.4.0.0.
Build log ( /github/home/.cabal/logs/ghc-7.2.2/HUnit-1.4.0.0-ee05ac789c5951eeab33b6ebd8b7181a5994296f27bc471def553d9c3f2907c9.log ):
Configuring library for HUnit-1.4.0.0..
Preprocessing library for HUnit-1.4.0.0..
Building library for HUnit-1.4.0.0..

src/Test/HUnit/Base.hs:1:14: Unsupported extension: ConstraintKinds
cabal: Failed to build HUnit-1.4.0.0 (which is required by hspec-2.3.0). See the build log above for details.

The reason appears to be that although HUnit-1.4.0.0 uses ConstraintKinds unconditionally, its version bounds on base (>=4 && <4.11). To fix these build plans, would you be able to revise the lower version bounds on base to >=4.5 to prevent it cabal's constraint solver from picking it with pre-7.4 versions of GHC? The following releases of HUnit would need this revision:

Let me know if I can help in any way.

Ok, so what happened is that I released call-stack-0.3.0 that builds with GHC < 7.4. As the constraint on call-stack for these versions of HUnit is unconstrained, this made these versions build with GHC < 7.4 too. Technically, we could add a constraint on call-stack instead, but this could invalid build plans for GHC >= 7.4 that were created in the last 2 days. So yes, I think adding the base lower bounds is probably the right thing to do. Or maybe amending other-extensions of these packages, not sure.

I'll use more upper bounds in the future, together with GitHub Actions that automate the process of amending released packages.

I added other-extensions: ConstraintKinds to these packages. This solves the issue, at least for recent versions of cabal-install.

@RyanGlScott I added you to the Hackage maintainer group of HUnit. If you think we need the base constraint too, please feel free to go ahead and add it ;).

@RyanGlScott thanks a lot for reporting this! 👍

Thanks a bunch, @sol!