Hello community, here is the log from the commit of package ghc-hashtables for openSUSE:Factory checked in at 2020-09-15 16:20:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hashtables (Old) and /work/SRC/openSUSE:Factory/.ghc-hashtables.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hashtables" Tue Sep 15 16:20:58 2020 rev:3 rq:833307 version:1.2.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hashtables/ghc-hashtables.changes 2020-08-28 21:33:03.516657871 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-hashtables.new.4249/ghc-hashtables.changes 2020-09-15 16:21:05.374183160 +0200 @@ -1,0 +2,18 @@ +Wed Sep 9 02:00:37 UTC 2020 - [email protected] + +- Update hashtables to version 1.2.4.1. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/hashtables-1.2.4.1/src/changelog.md + +------------------------------------------------------------------- +Tue Sep 8 02:00:37 UTC 2020 - [email protected] + +- Update hashtables to version 1.2.4.0. + ## 1.2.4.0 + + Fix a [correctness bug](https://github.com/gregorycollins/hashtables/issues/55) + with cuckoo hash tables and the new `mutate` function introduced in 1.2.3.0. + +------------------------------------------------------------------- Old: ---- hashtables-1.2.3.4.tar.gz New: ---- hashtables-1.2.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hashtables.spec ++++++ --- /var/tmp/diff_new_pack.cYJhn1/_old 2020-09-15 16:21:09.682187284 +0200 +++ /var/tmp/diff_new_pack.cYJhn1/_new 2020-09-15 16:21:09.686187288 +0200 @@ -17,8 +17,9 @@ %global pkg_name hashtables +%bcond_with tests Name: ghc-%{pkg_name} -Version: 1.2.3.4 +Version: 1.2.4.1 Release: 0 Summary: Mutable hash tables in the ST monad License: BSD-3-Clause @@ -29,6 +30,14 @@ BuildRequires: ghc-primitive-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-vector-devel +%if %{with tests} +BuildRequires: ghc-HUnit-devel +BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-mwc-random-devel +BuildRequires: ghc-test-framework-devel +BuildRequires: ghc-test-framework-hunit-devel +BuildRequires: ghc-test-framework-quickcheck2-devel +%endif %description This package provides a couple of different implementations of mutable hash @@ -123,6 +132,9 @@ %install %ghc_lib_install +%check +%cabal_test + %post devel %ghc_pkg_recache ++++++ hashtables-1.2.3.4.tar.gz -> hashtables-1.2.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/changelog.md new/hashtables-1.2.4.1/changelog.md --- old/hashtables-1.2.3.4/changelog.md 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/changelog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,16 @@ # Hashtables changelog +## 1.2.4.1 + +Update some test suite dep upper bounds. + +## 1.2.4.0 + + - Fix a [correctness bug](https://github.com/gregorycollins/hashtables/issues/55) +with cuckoo hash tables and the new `mutate` function introduced in 1.2.3.0. + + - Bring test suite into main .cabal file + ## 1.2.3.4 Fix build with GHC 8.8. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/hashtables.cabal new/hashtables-1.2.4.1/hashtables.cabal --- old/hashtables-1.2.3.4/hashtables.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/hashtables.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: hashtables -Version: 1.2.3.4 +Version: 1.2.4.1 Synopsis: Mutable hash tables in the ST monad Homepage: http://github.com/gregorycollins/hashtables License: BSD-3-Clause @@ -120,8 +120,6 @@ changelog.md, test/compute-overhead/ComputeOverhead.hs, test/hashtables-test.cabal, - test/runTestsAndCoverage.sh, - test/runTestsNoCoverage.sh, test/suite/Data/HashTable/Test/Common.hs, test/suite/TestSuite.hs @@ -209,10 +207,67 @@ ghc-prof-options: -auto-all if impl(ghc >= 6.12.0) - ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 + ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -fno-warn-unused-do-bind else - ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 + ghc-options: -Wall -fwarn-tabs -funbox-strict-fields + +test-suite testsuite + Default-Language: Haskell2010 + hs-source-dirs: src test/suite + main-is: TestSuite.hs + type: exitcode-stdio-1.0 + + if flag(sse42) && !flag(portable) + cc-options: -DUSE_SSE_4_2 -msse4.2 + cpp-options: -DUSE_SSE_4_2 + C-sources: cbits/sse-42.c + + if !flag(portable) && !flag(sse42) + C-sources: cbits/default.c + + if !flag(portable) + C-sources: cbits/common.c + + if flag(detailed-profiling) + ghc-prof-options: -auto-all + + if flag(portable) + cpp-options: -DNO_C_SEARCH -DPORTABLE + + if !flag(portable) && flag(unsafe-tricks) && impl(ghc) + cpp-options: -DUNSAFETRICKS + build-depends: ghc-prim + + if flag(debug) + cpp-options: -DDEBUG + + if flag(bounds-checking) + cpp-options: -DBOUNDS_CHECKING + + Build-depends: base >= 4 && <5, + hashable >= 1.1 && <1.2 || >= 1.2.1 && <1.4, + mwc-random >= 0.8 && <0.16, + primitive, + QuickCheck >= 2.3.0.2, + HUnit >= 1.2 && <2, + test-framework >= 0.3.1 && <0.9, + test-framework-quickcheck2 >= 0.2.6 && <0.4, + test-framework-hunit >= 0.2.6 && <3, + vector >= 0.7 + + cpp-options: -DTESTSUITE + + if impl(ghc >= 7) + ghc-options: -rtsopts + + if impl(ghc >= 6.12.0) + ghc-options: -Wall -fwarn-tabs -funbox-strict-fields + -fno-warn-unused-do-bind -threaded + else + ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -threaded + + source-repository head type: git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/src/Data/HashTable/ST/Cuckoo.hs new/hashtables-1.2.4.1/src/Data/HashTable/ST/Cuckoo.hs --- old/hashtables-1.2.3.4/src/Data/HashTable/ST/Cuckoo.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/src/Data/HashTable/ST/Cuckoo.hs 2001-09-09 03:46:40.000000000 +0200 @@ -486,8 +486,8 @@ else do result <- cuckooOrFail ht h1 h2 b1 b2 k v maybe (return ht) - (\(_k', _v') -> do - newHt <- grow ht k v + (\(k', v') -> do + newHt <- grow ht k' v' return newHt) result {-# INLINE mutate' #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/test/hashtables-test.cabal new/hashtables-1.2.4.1/test/hashtables-test.cabal --- old/hashtables-1.2.3.4/test/hashtables-test.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/test/hashtables-test.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -32,62 +32,6 @@ Default: False -Executable testsuite - hs-source-dirs: ../src suite - main-is: TestSuite.hs - - if flag(sse42) && !flag(portable) - cc-options: -DUSE_SSE_4_2 -msse4.2 - cpp-options: -DUSE_SSE_4_2 - C-sources: ../cbits/sse-42.c - - if !flag(portable) && !flag(sse42) - C-sources: ../cbits/default.c - - if !flag(portable) - C-sources: ../cbits/common.c - - ghc-prof-options: -prof -auto-all - - if flag(portable) || !flag(unsafe-tricks) - ghc-options: -fhpc - - if flag(portable) - cpp-options: -DNO_C_SEARCH -DPORTABLE - - if !flag(portable) && flag(unsafe-tricks) && impl(ghc) - cpp-options: -DUNSAFETRICKS - build-depends: ghc-prim - - if flag(debug) - cpp-options: -DDEBUG - - if flag(bounds-checking) - cpp-options: -DBOUNDS_CHECKING - - Build-depends: base >= 4 && <5, - hashable >= 1.1 && <1.2 || >= 1.2.1 && <1.3, - mwc-random >= 0.8 && <0.14, - primitive, - QuickCheck >= 2.3.0.2, - HUnit >= 1.2 && <2, - test-framework >= 0.3.1 && <0.9, - test-framework-quickcheck2 >= 0.2.6 && <0.4, - test-framework-hunit >= 0.2.6 && <3, - vector >= 0.7 - - cpp-options: -DTESTSUITE - - if impl(ghc >= 7) - ghc-options: -rtsopts - - if impl(ghc >= 6.12.0) - ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 - -fno-warn-unused-do-bind -threaded - else - ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 -threaded - - Executable compute-overhead hs-source-dirs: ../src suite compute-overhead main-is: ComputeOverhead.hs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/test/runTestsAndCoverage.sh new/hashtables-1.2.4.1/test/runTestsAndCoverage.sh --- old/hashtables-1.2.3.4/test/runTestsAndCoverage.sh 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/test/runTestsAndCoverage.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ -#!/bin/sh - -set -e - -SUITE=./dist/build/testsuite/testsuite - -export LC_ALL=C -export LANG=C - -rm -f testsuite.tix - -if [ ! -f $SUITE ]; then - cat <<EOF -Testsuite executable not found, please run: - cabal configure -ftest -then - cabal build -EOF - exit; -fi - -./dist/build/testsuite/testsuite -a1000 $* - -DIR=dist/hpc - -rm -Rf $DIR -mkdir -p $DIR - -EXCLUDES='Main -Data.HashTable.Test.Common -' - -EXCL="" - -for m in $EXCLUDES; do - EXCL="$EXCL --exclude=$m" -done - -hpc markup $EXCL --destdir=$DIR testsuite >/dev/null 2>&1 - -rm -f testsuite.tix - -cat <<EOF - -Test coverage report written to $DIR. -EOF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/test/runTestsNoCoverage.sh new/hashtables-1.2.4.1/test/runTestsNoCoverage.sh --- old/hashtables-1.2.3.4/test/runTestsNoCoverage.sh 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/test/runTestsNoCoverage.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -#!/bin/sh - -set -e - -SUITE=./dist/build/testsuite/testsuite - -export LC_ALL=C -export LANG=C - -if [ ! -f $SUITE ]; then - cat <<EOF -Testsuite executable not found, please run: - cabal configure -ftest -then - cabal build -EOF - exit; -fi - -./dist/build/testsuite/testsuite -j4 -a1000 $* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashtables-1.2.3.4/test/suite/Data/HashTable/Test/Common.hs new/hashtables-1.2.4.1/test/suite/Data/HashTable/Test/Common.hs --- old/hashtables-1.2.3.4/test/suite/Data/HashTable/Test/Common.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashtables-1.2.4.1/test/suite/Data/HashTable/Test/Common.hs 2001-09-09 03:46:40.000000000 +0200 @@ -26,11 +26,13 @@ import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 -import Test.HUnit (assertFailure) +import Test.HUnit (assertEqual, + assertFailure) import Test.QuickCheck (arbitrary, choose, sample') -import Test.QuickCheck.Monadic (PropertyM, assert, pre, - forAllM, monadicIO, run) +import Test.QuickCheck.Monadic (PropertyM, assert, + forAllM, monadicIO, pre, + run) ------------------------------------------------------------------------------ import qualified Data.HashTable.Class as C import Data.HashTable.Internal.Utils (unsafeIOToST) @@ -104,6 +106,7 @@ , SomeTest testNastyFullLookup , SomeTest testForwardSearch3 , SomeTest testMutate + , SomeTest testMutateGrow ] @@ -323,6 +326,19 @@ assertEq "mutate inserts correctly folded list value" s out2 forceType dummyArg ht +testMutateGrow :: HashTest +testMutateGrow prefix dummyArg = testCase (prefix ++ "/mutateGrow") go + where + go = do + tbl <- new + forceType tbl dummyArg + timeout_ 3000000 $ do + let inputs = [0..128 :: Int] + Monad.mapM_ (mutIns tbl) inputs + l <- sort <$> toList tbl + let expected = map (\i -> (i, i)) inputs + assertEqual "mutate-grow" expected l + mutIns tbl i = mutate tbl i (const (Just i, ())) ------------------------------------------------------------------------------ data Action = Lookup Int @@ -489,7 +505,7 @@ dedupe :: (Ord k, Ord v, Eq k) => [(k,v)] -> [(k,v)] dedupe l = go0 $ sort l where - go0 [] = [] + go0 [] = [] go0 (x:xs) = go id x xs go !dl !lastOne [] = (dl . (lastOne:)) []
