From 0a3a3ff771485265a609f500ed60e222bfa6294e Mon Sep 17 00:00:00 2001 From: Lysxia Date: Sat, 16 May 2020 23:09:47 -0400 Subject: [PATCH 1/8] Relax first-class-families bounds (#5237) --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 780d20d9..6d6be640 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -466,7 +466,7 @@ packages: "Li-yao Xia @Lysxia": - boltzmann-samplers - - first-class-families < 0.8.0.0 + - first-class-families - generic-data - generic-data-surgery < 0 # via generic-data - generic-random From 15804a5307eb55525debea1f0d501a9bfe04079a Mon Sep 17 00:00:00 2001 From: gbrsales Date: Sun, 17 May 2020 23:39:12 +0200 Subject: [PATCH 2/8] add cabal-appimage --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3e171ee2..9813428e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -4241,6 +4241,9 @@ packages: "Rickey Visinski @rickeyski": - slack-api + + "Gabriele Sales @gbrsales": + - cabal-appimage "Grandfathered dependencies": - network From 4602d8ebb26706337d7ba2d8911c34e758e4a1d1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 20:29:48 +0800 Subject: [PATCH 3/8] etc/diskspace/remove-old-stack-work-libs.hs: diskspace reclaimer should be run in work/{nightly,lts*}/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*/ --- etc/diskspace/remove-old-stack-work-libs.hs | 55 +++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 etc/diskspace/remove-old-stack-work-libs.hs diff --git a/etc/diskspace/remove-old-stack-work-libs.hs b/etc/diskspace/remove-old-stack-work-libs.hs new file mode 100755 index 00000000..b1d7d7a4 --- /dev/null +++ b/etc/diskspace/remove-old-stack-work-libs.hs @@ -0,0 +1,55 @@ +#!/usr/bin/env stack +-- stack --resolver lts script + +-- Utility to remove old libs installed under .stack-work/ to save diskspace + +-- Should be run in: +-- work/*/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-* + +import Data.List +import System.Directory + +main = do + files <- listDirectory "." + (libdirs,dynlibs) <- partitionM doesDirectoryExist files + let pkglibdirs = groupBy samePkgLibDir libdirs + pkgdynlibs = groupBy samePkgDynLib dynlibs + mapM_ (removeOlder removeDirectoryRecursive) pkglibdirs + mapM_ (removeOlder removeFile) pkgdynlibs + where + samePkgLibDir l1 l2 = pkgDirName l1 == pkgDirName l2 + where + pkgDirName p = + if countDashes p < 2 + then error $ p ++ " not in name-version-hash format" + else (removeDashSegment . removeDashSegment) p + + countDashes = length . filter (== '-') + + removeDashSegment = init . dropWhileEnd (/= '-') + + samePkgDynLib d1 d2 = pkgDynName d1 == pkgDynName d2 + where + pkgDynName p = + if countDashes p < 3 + then error $ p ++ " not in libname-version-hash-ghc*.so format" + else (removeDashSegment . removeDashSegment . removeDashSegment) p + + removeOlder remover files = do + oldfiles <- drop 2 . reverse <$> sortByAge files + mapM_ remover oldfiles + + sortByAge files = do + timestamps <- mapM getModificationTime files + let fileTimes = zip files timestamps + return $ map fst $ sortBy compareSnd fileTimes + + compareSnd (_,t1) (_,t2) = compare t1 t2 + +-- borrowed from Control.Monad.Extra +partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a]) +partitionM f [] = pure ([], []) +partitionM f (x:xs) = do + res <- f x + (as,bs) <- partitionM f xs + pure ([x | res]++as, [x | not res]++bs) From d833c0ba59e2470b8d288519b37b2412ee1a0d1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 20:42:00 +0800 Subject: [PATCH 4/8] remove-old-stack-work-libs.hs: use lts-14 because we have ghc-8.6.5 under ~/.stack/ (better would be to remove ~/.stack and use dot-stackage) --- etc/diskspace/remove-old-stack-work-libs.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/diskspace/remove-old-stack-work-libs.hs b/etc/diskspace/remove-old-stack-work-libs.hs index b1d7d7a4..0621490f 100755 --- a/etc/diskspace/remove-old-stack-work-libs.hs +++ b/etc/diskspace/remove-old-stack-work-libs.hs @@ -1,5 +1,5 @@ #!/usr/bin/env stack --- stack --resolver lts script +-- stack --resolver lts-14 script -- Utility to remove old libs installed under .stack-work/ to save diskspace From 4e43341b34fabfd2616251271346e7bd35c5afad Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 21:17:16 +0800 Subject: [PATCH 5/8] remove-old-stack-work-libs.hs: sort directory list for grouping --- etc/diskspace/remove-old-stack-work-libs.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/diskspace/remove-old-stack-work-libs.hs b/etc/diskspace/remove-old-stack-work-libs.hs index 0621490f..7e81b5e7 100755 --- a/etc/diskspace/remove-old-stack-work-libs.hs +++ b/etc/diskspace/remove-old-stack-work-libs.hs @@ -10,7 +10,7 @@ import Data.List import System.Directory main = do - files <- listDirectory "." + files <- sort <$> listDirectory "." (libdirs,dynlibs) <- partitionM doesDirectoryExist files let pkglibdirs = groupBy samePkgLibDir libdirs pkgdynlibs = groupBy samePkgDynLib dynlibs From 25f97ff187a76ecd6efdc96f09a13df29d11a558 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 21:39:33 +0800 Subject: [PATCH 6/8] conferer < 0.4.0.0 (#5374) --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3e171ee2..9bb200e5 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -3865,7 +3865,7 @@ packages: - map-syntax < 0 # GHC 8.4 via base-4.11.0.0 - heist < 0 # GHC 8.4 via map-syntax - snap < 0 # GHC 8.4 via base-4.11.0.0 - - conferer + - conferer < 0.4.0.0 # https://github.com/commercialhaskell/stackage/issues/5374 # - conferer-snap # Because snap - conferer-warp - conferer-hspec From 3daeb1ce83d43682b3b2a18dac4ba82f8ca254ee Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 21:51:22 +0800 Subject: [PATCH 7/8] conferer-hspec, conferer-warp < 0.4.0.0 (#5374) --- build-constraints.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 20b3b13e..6b29bfdb 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -3867,8 +3867,8 @@ packages: - snap < 0 # GHC 8.4 via base-4.11.0.0 - conferer < 0.4.0.0 # https://github.com/commercialhaskell/stackage/issues/5374 # - conferer-snap # Because snap - - conferer-warp - - conferer-hspec + - conferer-warp < 0.4.0.0 # https://github.com/commercialhaskell/stackage/issues/5374 + - conferer-hspec < 0.4.0.0 # https://github.com/commercialhaskell/stackage/issues/5374 - conferer-provider-json "Tim Humphries @thumphries": From 48e8bb875daa55e2db4a9ae33fb6fca0cd99433f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 18 May 2020 22:01:09 +0800 Subject: [PATCH 8/8] revert "constraints < 0.12" (#5124) --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6b29bfdb..e2e3b165 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -862,7 +862,7 @@ packages: - compensated - compressed < 0 - concurrent-supply - - constraints < 0.12 # https://github.com/commercialhaskell/stackage/issues/5124 + - constraints - contravariant - distributive - discrimination < 0