Hello community, here is the log from the commit of package ghc-distributive for openSUSE:Factory checked in at 2018-05-30 12:06:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-distributive (Old) and /work/SRC/openSUSE:Factory/.ghc-distributive.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-distributive" Wed May 30 12:06:46 2018 rev:5 rq:607785 version:0.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-distributive/ghc-distributive.changes 2017-03-18 20:50:22.607355383 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-distributive.new/ghc-distributive.changes 2018-05-30 12:25:28.146007528 +0200 @@ -1,0 +2,15 @@ +Mon May 14 17:02:11 UTC 2018 - [email protected] + +- Update distributive to version 0.5.3 revision 5. + * Support `doctest-0.12` + * Revamp `Setup.hs` to use `cabal-doctest`. This makes `distributive` build + with `Cabal-1.25`, and makes the `doctest`s work with `cabal new-build` and + sandboxes. + * Fix bugs in `Data.Distributive.Generic` that cause generic `Distributive` + instances not to work properly for datatypes with recursive types + * Add `genericCollect` to `Data.Distributive.Generic`, and switch the underlying + machinery in that module to work on a `collect`-like method instead of a + `distribute`-like one + * Add a test suite for regression-testing `Data.Distributive.Generic` + +------------------------------------------------------------------- Old: ---- distributive-0.5.2.tar.gz New: ---- distributive-0.5.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-distributive.spec ++++++ --- /var/tmp/diff_new_pack.D8h1sz/_old 2018-05-30 12:25:28.813985554 +0200 +++ /var/tmp/diff_new_pack.D8h1sz/_new 2018-05-30 12:25:28.817985422 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-distributive # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,14 @@ %global pkg_name distributive %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.5.2 +Version: 0.5.3 Release: 0 Summary: Distributive functors -- Dual to Traversable License: BSD-2-Clause -Group: Development/Languages/Other -Url: https://hackage.haskell.org/package/%{pkg_name} +Group: Development/Libraries/Haskell +URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/5.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-base-orphans-devel BuildRequires: ghc-cabal-doctest-devel @@ -34,7 +34,6 @@ BuildRequires: ghc-tagged-devel BuildRequires: ghc-transformers-compat-devel BuildRequires: ghc-transformers-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with tests} BuildRequires: ghc-doctest-devel BuildRequires: ghc-generic-deriving-devel @@ -46,7 +45,7 @@ %package devel Summary: Haskell %{pkg_name} library development files -Group: Development/Libraries/Other +Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} @@ -75,11 +74,9 @@ %ghc_pkg_recache %files -f %{name}.files -%defattr(-,root,root,-) -%doc LICENSE +%license LICENSE %files devel -f %{name}-devel.files -%defattr(-,root,root,-) %doc CHANGELOG.markdown README.markdown %changelog ++++++ distributive-0.5.2.tar.gz -> distributive-0.5.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distributive-0.5.2/.travis.yml new/distributive-0.5.3/.travis.yml --- old/distributive-0.5.2/.travis.yml 2017-02-01 04:29:28.000000000 +0100 +++ new/distributive-0.5.3/.travis.yml 2017-07-29 02:37:52.000000000 +0200 @@ -14,25 +14,25 @@ matrix: include: - - env: CABALVER=1.18 GHCVER=7.0.4 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.0.4 BUILD=cabal compiler: ": #GHC 7.0.4" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.0.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.0.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.2.2 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.2.2 BUILD=cabal compiler: ": #GHC 7.2.2" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.2.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.2.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.4.2 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.4.2 BUILD=cabal compiler: ": #GHC 7.4.2" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.4.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.4.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.6.3 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.6.3 BUILD=cabal compiler: ": #GHC 7.6.3" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.6.3,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.4 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.8.4 BUILD=cabal compiler: ": #GHC 7.8.4" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.8.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} # - env: BUILD=stack STACK_YAML=stack-7.8.yaml STACK_OPTIONS=--skip-ghc-check # addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} @@ -40,14 +40,18 @@ # - env: BUILD=stack STACK_YAML=stack-7.8.yaml # os: osx - - env: CABALVER=1.22 GHCVER=7.10.3 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.10.3 BUILD=cabal compiler: ": #GHC 7.10.3" - addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.3,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} - env: CABALVER=1.24 GHCVER=8.0.2 BUILD=cabal compiler: ": #GHC 8.0.2" addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + - env: CABALVER=2.0 GHCVER=8.2.1 BUILD=cabal + compiler: ": #GHC 8.2.1" + addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} + - env: CABALVER=1.24 GHCVER=head BUILD=cabal CABALFLAGS=--allow-newer compiler: ": #GHC head" addons: {apt: {packages: [cabal-install-1.24,ghc-head,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}} @@ -59,8 +63,8 @@ # os: osx allow_failures: - - env: CABALVER=1.18 GHCVER=7.0.4 BUILD=cabal - - env: CABALVER=1.18 GHCVER=7.2.2 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.0.4 BUILD=cabal + - env: CABALVER=1.24 GHCVER=7.2.2 BUILD=cabal - env: CABALVER=1.24 GHCVER=head BUILD=cabal CABALFLAGS=--allow-newer before_install: @@ -103,7 +107,6 @@ rm -rf $HOME/.cabsnap; mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin; cabal install --only-dependencies --enable-tests --enable-benchmarks $CABALFLAGS; - if [ "$GHCVER" = "7.10.3" ]; then cabal install Cabal-1.22.4.0; fi; fi; if [ ! -d $HOME/.cabsnap ]; then echo "snapshotting package-db to build-cache"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distributive-0.5.2/CHANGELOG.markdown new/distributive-0.5.3/CHANGELOG.markdown --- old/distributive-0.5.2/CHANGELOG.markdown 2017-02-01 04:29:28.000000000 +0100 +++ new/distributive-0.5.3/CHANGELOG.markdown 2017-07-29 02:37:52.000000000 +0200 @@ -1,3 +1,7 @@ +0.5.3 +----- +* Support `doctest-0.12` + 0.5.2 ----- * Revamp `Setup.hs` to use `cabal-doctest`. This makes `distributive` build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distributive-0.5.2/Setup.lhs new/distributive-0.5.3/Setup.lhs --- old/distributive-0.5.2/Setup.lhs 2017-02-01 04:29:28.000000000 +0100 +++ new/distributive-0.5.3/Setup.lhs 2017-07-29 02:37:52.000000000 +0200 @@ -1,182 +1,34 @@ \begin{code} {-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -Wall #-} module Main (main) where #ifndef MIN_VERSION_cabal_doctest #define MIN_VERSION_cabal_doctest(x,y,z) 0 #endif - #if MIN_VERSION_cabal_doctest(1,0,0) -import Distribution.Extra.Doctest ( defaultMainWithDoctests ) -#else --- Otherwise we provide a shim - -#ifndef MIN_VERSION_Cabal -#define MIN_VERSION_Cabal(x,y,z) 0 -#endif -#ifndef MIN_VERSION_directory -#define MIN_VERSION_directory(x,y,z) 0 -#endif -#if MIN_VERSION_Cabal(1,24,0) -#define InstalledPackageId UnitId -#endif - -import Control.Monad ( when ) -import Data.List ( nub ) -import Data.String ( fromString ) -import Distribution.Package ( InstalledPackageId ) -import Distribution.Package ( PackageId, Package (..), packageVersion ) -import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) , Library (..), BuildInfo (..)) -import Distribution.Simple ( defaultMainWithHooks, UserHooks(..), simpleUserHooks ) -import Distribution.Simple.Utils ( rewriteFile, createDirectoryIfMissingVerbose ) -import Distribution.Simple.BuildPaths ( autogenModulesDir ) -import Distribution.Simple.Setup ( BuildFlags(buildDistPref, buildVerbosity), fromFlag) -import Distribution.Simple.LocalBuildInfo ( withPackageDB, withLibLBI, withTestLBI, LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps), compiler ) -import Distribution.Simple.Compiler ( showCompilerId , PackageDB (..)) -import Distribution.Text ( display , simpleParse ) -import System.FilePath ( (</>) ) - -#if MIN_VERSION_Cabal(1,25,0) -import Distribution.Simple.BuildPaths ( autogenComponentModulesDir ) -#endif +import Distribution.Extra.Doctest ( defaultMainWithDoctests ) +main :: IO () +main = defaultMainWithDoctests "doctests" -#if MIN_VERSION_directory(1,2,2) -import System.Directory (makeAbsolute) #else -import System.Directory (getCurrentDirectory) -import System.FilePath (isAbsolute) -makeAbsolute :: FilePath -> IO FilePath -makeAbsolute p | isAbsolute p = return p - | otherwise = do - cwd <- getCurrentDirectory - return $ cwd </> p +#ifdef MIN_VERSION_Cabal +-- If the macro is defined, we have new cabal-install, +-- but for some reason we don't have cabal-doctest in package-db +-- +-- Probably we are running cabal sdist, when otherwise using new-build +-- workflow +import Warning () #endif -generateBuildModule :: String -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO () -generateBuildModule testsuiteName flags pkg lbi = do - let verbosity = fromFlag (buildVerbosity flags) - let distPref = fromFlag (buildDistPref flags) - - -- Package DBs - let dbStack = withPackageDB lbi ++ [ SpecificPackageDB $ distPref </> "package.conf.inplace" ] - let dbFlags = "-hide-all-packages" : packageDbArgs dbStack - - withLibLBI pkg lbi $ \lib libcfg -> do - let libBI = libBuildInfo lib - - -- modules - let modules = exposedModules lib ++ otherModules libBI - -- it seems that doctest is happy to take in module names, not actual files! - let module_sources = modules - - -- We need the directory with library's cabal_macros.h! -#if MIN_VERSION_Cabal(1,25,0) - let libAutogenDir = autogenComponentModulesDir lbi libcfg -#else - let libAutogenDir = autogenModulesDir lbi -#endif +import Distribution.Simple - -- Lib sources and includes - iArgs <- mapM (fmap ("-i"++) . makeAbsolute) $ libAutogenDir : hsSourceDirs libBI - includeArgs <- mapM (fmap ("-I"++) . makeAbsolute) $ includeDirs libBI - - -- CPP includes, i.e. include cabal_macros.h - let cppFlags = map ("-optP"++) $ - [ "-include", libAutogenDir ++ "/cabal_macros.h" ] - ++ cppOptions libBI - - withTestLBI pkg lbi $ \suite suitecfg -> when (testName suite == fromString testsuiteName) $ do - - -- get and create autogen dir -#if MIN_VERSION_Cabal(1,25,0) - let testAutogenDir = autogenComponentModulesDir lbi suitecfg -#else - let testAutogenDir = autogenModulesDir lbi -#endif - createDirectoryIfMissingVerbose verbosity True testAutogenDir - - -- write autogen'd file - rewriteFile (testAutogenDir </> "Build_doctests.hs") $ unlines - [ "module Build_doctests where" - , "" - -- -package-id etc. flags - , "pkgs :: [String]" - , "pkgs = " ++ (show $ formatDeps $ testDeps libcfg suitecfg) - , "" - , "flags :: [String]" - , "flags = " ++ show (iArgs ++ includeArgs ++ dbFlags ++ cppFlags) - , "" - , "module_sources :: [String]" - , "module_sources = " ++ show (map display module_sources) - ] - where - -- we do this check in Setup, as then doctests don't need to depend on Cabal - isOldCompiler = maybe False id $ do - a <- simpleParse $ showCompilerId $ compiler lbi - b <- simpleParse "7.5" - return $ packageVersion (a :: PackageId) < b - - formatDeps = map formatOne - formatOne (installedPkgId, pkgId) - -- The problem is how different cabal executables handle package databases - -- when doctests depend on the library - | packageId pkg == pkgId = "-package=" ++ display pkgId - | otherwise = "-package-id=" ++ display installedPkgId - - -- From Distribution.Simple.Program.GHC - packageDbArgs :: [PackageDB] -> [String] - packageDbArgs | isOldCompiler = packageDbArgsConf - | otherwise = packageDbArgsDb - - -- GHC <7.6 uses '-package-conf' instead of '-package-db'. - packageDbArgsConf :: [PackageDB] -> [String] - packageDbArgsConf dbstack = case dbstack of - (GlobalPackageDB:UserPackageDB:dbs) -> concatMap specific dbs - (GlobalPackageDB:dbs) -> ("-no-user-package-conf") - : concatMap specific dbs - _ -> ierror - where - specific (SpecificPackageDB db) = [ "-package-conf=" ++ db ] - specific _ = ierror - ierror = error $ "internal error: unexpected package db stack: " - ++ show dbstack - - -- GHC >= 7.6 uses the '-package-db' flag. See - -- https://ghc.haskell.org/trac/ghc/ticket/5977. - packageDbArgsDb :: [PackageDB] -> [String] - -- special cases to make arguments prettier in common scenarios - packageDbArgsDb dbstack = case dbstack of - (GlobalPackageDB:UserPackageDB:dbs) - | all isSpecific dbs -> concatMap single dbs - (GlobalPackageDB:dbs) - | all isSpecific dbs -> "-no-user-package-db" - : concatMap single dbs - dbs -> "-clear-package-db" - : concatMap single dbs - where - single (SpecificPackageDB db) = [ "-package-db=" ++ db ] - single GlobalPackageDB = [ "-global-package-db" ] - single UserPackageDB = [ "-user-package-db" ] - isSpecific (SpecificPackageDB _) = True - isSpecific _ = False - -testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)] -testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys - -defaultMainWithDoctests :: String -> IO () -defaultMainWithDoctests testSuiteName = defaultMainWithHooks simpleUserHooks - { buildHook = \pkg lbi hooks flags -> do - generateBuildModule testSuiteName flags pkg lbi - buildHook simpleUserHooks pkg lbi hooks flags - } +main :: IO () +main = defaultMain #endif -main :: IO () -main = defaultMainWithDoctests "doctests" - \end{code} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distributive-0.5.2/Warning.hs new/distributive-0.5.3/Warning.hs --- old/distributive-0.5.2/Warning.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/distributive-0.5.3/Warning.hs 2017-07-29 02:37:52.000000000 +0200 @@ -0,0 +1,5 @@ +module Warning + {-# WARNING ["You are configuring this package without cabal-doctest installed.", + "The doctests test-suite will not work as a result.", + "To fix this, install cabal-doctest before configuring."] #-} + () where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distributive-0.5.2/distributive.cabal new/distributive-0.5.3/distributive.cabal --- old/distributive-0.5.2/distributive.cabal 2017-02-01 04:29:28.000000000 +0100 +++ new/distributive-0.5.3/distributive.cabal 2017-07-29 02:37:52.000000000 +0200 @@ -1,6 +1,6 @@ name: distributive category: Data Structures -version: 0.5.2 +version: 0.5.3 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE @@ -20,6 +20,7 @@ travis-cabal-apt-install CHANGELOG.markdown README.markdown + Warning.hs source-repository head type: git @@ -28,6 +29,7 @@ custom-setup setup-depends: base >= 4 && <5, + Cabal, cabal-doctest >= 1 && <1.1 flag semigroups @@ -82,7 +84,8 @@ main-is: doctests.hs build-depends: base >= 4, - doctest >= 0.11.1 && <0.12 + distributive, + doctest >= 0.11.1 && <0.13 ghc-options: -Wall -threaded hs-source-dirs: tests ++++++ distributive.cabal ++++++ --- /var/tmp/diff_new_pack.D8h1sz/_old 2018-05-30 12:25:28.909982396 +0200 +++ /var/tmp/diff_new_pack.D8h1sz/_new 2018-05-30 12:25:28.909982396 +0200 @@ -1,7 +1,7 @@ name: distributive category: Data Structures -version: 0.5.2 -x-revision: 2 +version: 0.5.3 +x-revision: 5 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE @@ -21,6 +21,7 @@ travis-cabal-apt-install CHANGELOG.markdown README.markdown + Warning.hs source-repository head type: git @@ -29,8 +30,8 @@ custom-setup setup-depends: base >= 4 && <5, - cabal-doctest >= 1 && <1.1, - Cabal + Cabal, + cabal-doctest >= 1 && <1.1 flag semigroups manual: True @@ -51,7 +52,7 @@ library build-depends: base >= 4 && < 5, - base-orphans >= 0.5 && < 1, + base-orphans >= 0.5.2 && < 1, transformers >= 0.2 && < 0.6, transformers-compat >= 0.3 && < 1 @@ -70,7 +71,8 @@ if impl(ghc < 8.0) if flag(semigroups) - build-depends: semigroups >= 0.11 && < 1 + -- we need Functor Semi.Min etc. + build-depends: semigroups >= 0.13 && < 1 if impl(ghc < 7.8) hs-source-dirs: src-compat @@ -84,7 +86,8 @@ main-is: doctests.hs build-depends: base >= 4, - doctest >= 0.11.1 && <0.12 + distributive, + doctest >= 0.11.1 && <0.16 ghc-options: -Wall -threaded hs-source-dirs: tests
