haskell/zlib

Support tasty-hunit-0.9

phadej opened this issue · 6 comments

As it says "DO NOT USE YET", I leave this here, and don't make a PR

From 08fa33173fe347a028c43b0f002356ef9d6a0772 Mon Sep 17 00:00:00 2001
From: Oleg Grenrus <oleg.grenrus@iki.fi>
Date: Tue, 22 Sep 2015 07:58:18 +0300
Subject: [PATCH] Support tasty-hunit-0.9

---
 test/Test.hs | 1 -
 zlib.cabal   | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/test/Test.hs b/test/Test.hs
index 0665542..bbd8b94 100644
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -11,7 +11,6 @@ import Test.Codec.Compression.Zlib.Internal ()
 import Test.Codec.Compression.Zlib.Stream ()

 import Test.QuickCheck
-import Test.HUnit
 import Test.Tasty
 import Test.Tasty.QuickCheck
 import Test.Tasty.HUnit
diff --git a/zlib.cabal b/zlib.cabal
index 6e99e45..c9300b3 100644
--- a/zlib.cabal
+++ b/zlib.cabal
@@ -80,8 +80,7 @@ test-suite tests
   default-language: Haskell2010
   build-depends:   base, bytestring, zlib,
                    QuickCheck       == 2.*,
-                   HUnit            == 1.2.*,
-                   tasty            >= 0.8 && < 0.11,
+                   tasty            >= 0.8 && < 0.12,
                    tasty-quickcheck == 0.8.*,
-                   tasty-hunit      == 0.8.*
+                   tasty-hunit      >= 0.8 && < 0.10
   ghc-options:     -Wall
-- 
2.4.2

hvr commented

@phadej actually, please make a PR, that way we can test if TravisCI works as expected

This looks like it's done, but it hasn't been released to hackage yet. @hvr would you mind making another release?

See also: commercialhaskell/stackage#1085

hvr commented

@DanBurton I'm not granted upload powers to zlib, I can only make .cabal edits

However, it seems that @phadej restricted tasty-unit again back to excluding 0.9, see http://hackage.haskell.org/package/zlib-0.6.1.1/revisions/

@phadej, was there a reason to restrict zlib again?

@hvr tasty-hunit doesn't depend on HUnit, but defines assertions functions itself: thus ambiguous names:

    Ambiguous occurrence ‘assertFailure’
    It could refer to either ‘Test.HUnit.assertFailure’,
                             imported from ‘Test.HUnit’ at test/Test.hs:14:1-17
                             (and originally defined in ‘Test.HUnit.Lang’)
                          or ‘Test.Tasty.HUnit.assertFailure’,
                             imported from ‘Test.Tasty.HUnit’ at test/Test.hs:17:1-23
                             (and originally defined in ‘tasty-hunit-0.9.2:Test.Tasty.HUnit.Orig’)

in master, test/Test.hs doesn't import Test.HUnit anymore, and Test.Tasty.HUnit for older tasty does re-export it IIRC.

#3 was merged.

When can this be released to hackage?