From f7aa2e2aa67b0a047a3d948851db6a817993ae27 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 28 Dec 2014 09:29:38 +0200 Subject: [PATCH 001/233] Add two conduit packages --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index f23f511c..8895f913 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -42,6 +42,8 @@ packages: - repa-algorithms - repa-devil - JuicyPixels-repa + - cereal-conduit + - binary-conduit "FP Complete michael@fpcomplete.com @snoyberg": - alex From 3d5a826ed6976b83579dd789a50220f1e67f521f Mon Sep 17 00:00:00 2001 From: Alexander Thiemann Date: Mon, 29 Dec 2014 03:54:27 +0100 Subject: [PATCH 002/233] added more Spock packages --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index f23f511c..2b3cbf06 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -588,6 +588,8 @@ packages: - graph-core - reroute - Spock + - Spock-digestive + - Spock-worker "Joey Eremondi ": - aeson-pretty From ffd56719a69620f827895a90b60ccd8a50f16e0a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 12:05:09 +0200 Subject: [PATCH 003/233] Upper bound lifted-async for #370 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0e07ca36..8d25164d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -646,6 +646,7 @@ packages: - monad-control < 1 - hasql < 0.5 - list-t < 0.4 + - lifted-async < 0.5 # Global flags are applied to all packages global-flags: From 99d4f45a89ed70fed0d8ee4e8aec0d33895ef6ae Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 12:05:56 +0200 Subject: [PATCH 004/233] Fix upper bound --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8d25164d..bed91bb5 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -646,7 +646,7 @@ packages: - monad-control < 1 - hasql < 0.5 - list-t < 0.4 - - lifted-async < 0.5 + - lifted-async < 0.3 # Global flags are applied to all packages global-flags: From 8494957758fdf0310a94e192d6c354452cb71068 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 12:17:04 +0200 Subject: [PATCH 005/233] More upper bounds #370 #384 --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index bed91bb5..bcc93f35 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -645,6 +645,8 @@ packages: # https://github.com/fpco/stackage/issues/370 - monad-control < 1 - hasql < 0.5 + - hasql-backend < 0.3 + - hasql-postgres < 0.10 - list-t < 0.4 - lifted-async < 0.3 From 2da61ec1a75b7011913f9db29474bdbe21c382e9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 12:23:48 +0200 Subject: [PATCH 006/233] Temporarily remove hopenpgp-tools #319 --- build-constraints.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index bcc93f35..9932f13b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -455,7 +455,8 @@ packages: - openpgp-asciiarmor - MusicBrainz - DAV - - hopenpgp-tools + # https://github.com/fpco/stackage/issues/319 + # - hopenpgp-tools # https://github.com/fpco/stackage/issues/160 "Ketil Malde": @@ -636,12 +637,6 @@ packages: # https://github.com/fpco/stackage/issues/291 - random < 1.0.1.3 - # https://github.com/fpco/stackage/issues/318 - - HaXml < 1.25 - - # https://github.com/fpco/stackage/issues/319 - - polyparse < 1.10 - # https://github.com/fpco/stackage/issues/370 - monad-control < 1 - hasql < 0.5 From bfac675e216b62790c7216cb1d29b20dee1aa191 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 12:55:10 +0200 Subject: [PATCH 007/233] Add lzma-conduit --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 9932f13b..980c2580 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -44,6 +44,7 @@ packages: - JuicyPixels-repa - cereal-conduit - binary-conduit + - lzma-conduit "FP Complete michael@fpcomplete.com @snoyberg": - alex From b696813990df868d5636e180a5b2ce26a8273b59 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 14:02:50 +0200 Subject: [PATCH 008/233] Expected HaXml Haddock failure #385 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 980c2580..3877e6ba 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -863,6 +863,9 @@ expected-haddock-failures: # https://github.com/ekmett/gl/issues/4 - gl + # https://github.com/fpco/stackage/issues/385 + - HaXml + # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From e969234668b4693f176fb3a1fdadba6668368c6d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 15:28:01 +0200 Subject: [PATCH 009/233] Expected test failure vincenthz/hs-crypto-pubkey#17 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3877e6ba..27432eee 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -855,6 +855,9 @@ expected-test-failures: - crypto-numbers - distributed-process-task + # https://github.com/vincenthz/hs-crypto-pubkey/issues/17 + - crypto-pubkey + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From e10ac7c34984388e6f90b23852cddf8ea97c17e4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 15:29:24 +0200 Subject: [PATCH 010/233] Add liblzma-dev Debian package Pinging @manny-fp --- debian-bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 13d45155..50177b28 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -46,4 +46,5 @@ sudo apt-get install -y \ libnotify-dev \ libgd2-xpm-dev \ libyaml-dev \ + liblzma-dev \ libzmq3-dev From 6e831efb166c897c92c5384d5eb9bfc593b6ea22 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 15:31:03 +0200 Subject: [PATCH 011/233] Expected test failure agrafix/Spock-worker#2 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 27432eee..c7e8a4df 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -858,6 +858,9 @@ expected-test-failures: # https://github.com/vincenthz/hs-crypto-pubkey/issues/17 - crypto-pubkey + # https://github.com/agrafix/Spock-worker/issues/2 + - Spock-worker + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 4e2d1913cd0ed00f69350d589cb5a8e4a2ed2ba2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 29 Dec 2014 15:39:23 +0200 Subject: [PATCH 012/233] Remove upper bounds and close #384 --- build-constraints.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index c7e8a4df..9fea51c9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -640,10 +640,6 @@ packages: # https://github.com/fpco/stackage/issues/370 - monad-control < 1 - - hasql < 0.5 - - hasql-backend < 0.3 - - hasql-postgres < 0.10 - - list-t < 0.4 - lifted-async < 0.3 # Global flags are applied to all packages From 2edae13c1be0b0c96fd1e3386fe7dd58fbbd6687 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Mon, 29 Dec 2014 18:41:32 -0800 Subject: [PATCH 013/233] Add broadcast-chan --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 9fea51c9..2e9e3588 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -547,6 +547,7 @@ packages: "Emanuel Borsobom ": - BoundedChan + - broadcast-chan - bytestring-lexing - bytestring-trie - data-accessor From 6ade4f88a61b174a0a59b322e708ca3d37fadc77 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 30 Dec 2014 05:59:51 +0200 Subject: [PATCH 014/233] Add back packages from #382 --- build-constraints.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 2e9e3588..fec41263 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -402,9 +402,8 @@ packages: - hPDB - hPDB-examples - # https://github.com/fpco/stackage/pull/382#issuecomment-68182467 - # - wordpass - # - json-autotype + - wordpass + - json-autotype "Roman Cheplyaka ": - action-permutations From 982ac1580940d7770620d297f4b096321b9195ec Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 30 Dec 2014 06:02:04 +0200 Subject: [PATCH 015/233] Add back packages and close #381 --- build-constraints.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index fec41263..d61afd50 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -108,10 +108,8 @@ packages: - distributed-process-async - distributed-process-client-server - distributed-process-supervisor - - # https://github.com/fpco/stackage/issues/381 - #- distributed-process-task - #- distributed-process-execution + - distributed-process-task + - distributed-process-execution - kure From 08011c036edb83231c8a84a193006d3a562e4e90 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Tue, 30 Dec 2014 09:13:29 +0000 Subject: [PATCH 016/233] Add yarr. --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index d61afd50..fc172aaf 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -403,6 +403,9 @@ packages: - wordpass - json-autotype + "Dominic Steinitz ": + - yarr + "Roman Cheplyaka ": - action-permutations - amqp From ffca332cba38cdcb39900181f76144e429975eef Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 30 Dec 2014 14:16:33 +0200 Subject: [PATCH 017/233] Remove expected failure --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index d61afd50..c6adca8e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -852,9 +852,6 @@ expected-test-failures: # https://github.com/vincenthz/hs-crypto-pubkey/issues/17 - crypto-pubkey - # https://github.com/agrafix/Spock-worker/issues/2 - - Spock-worker - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 97cc42a6d2b6d35e29a638908183c46f4250f10c Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Dec 2014 11:34:20 -0800 Subject: [PATCH 018/233] Add wl-pprint-text This was pulled in by graphviz, so it disappeared after graphviz was removed. --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c6adca8e..42b767e8 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -563,6 +563,7 @@ packages: - multimap - parallel-io - text-binary + - wl-pprint-text "Michael Sloan Date: Wed, 31 Dec 2014 10:47:15 +0200 Subject: [PATCH 019/233] Upper bound for #389 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 42b767e8..b7022782 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -641,6 +641,9 @@ packages: - monad-control < 1 - lifted-async < 0.3 + # https://github.com/fpco/stackage/issues/389 + - lens < 4.7 + # Global flags are applied to all packages global-flags: blaze_html_0_5: true From 7819eea565ecfa0c4a013038810fa2683618b008 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 18:52:30 +0100 Subject: [PATCH 020/233] Port stackage.hs to use optparse-applicative --- app/stackage.hs | 56 +++++++++++++++++++++++++++++++++++++------------ stackage.cabal | 1 + 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/app/stackage.hs b/app/stackage.hs index b78dbb9c..c324221e 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -1,16 +1,46 @@ +module Main where + +import Control.Monad +import Data.Monoid +import Data.Version +import Options.Applicative +import Paths_stackage (version) import Stackage.CompleteBuild -import System.Environment (getArgs) main :: IO () -main = do - args <- getArgs - case args of - [x] | Just y <- lookup x m -> y - _ -> error $ "Expected one argument, one of: " ++ unwords (map fst m) - where - m = - [ ("nightly", completeBuild Nightly) - , ("lts-major", completeBuild $ LTS Major) - , ("lts-minor", completeBuild $ LTS Minor) - , ("check", justCheck) - ] +main = + join (execParser + (info (helpOption <*> versionOption <*> config) + (header "Stackage" <> + fullDesc))) + where helpOption = + abortOption + ShowHelpText + (long "help" <> + help "Show this help text") + versionOption = + infoOption + ("fpbuild version " ++ showVersion version) + (long "version" <> + help "Show fpbuild version") + config = + subparser (mconcat [cmnd completeBuild + (pure Nightly) + "nightly" + "Build, test and upload the Nightly snapshot" + ,cmnd completeBuild + (pure (LTS Major)) + "lts-major" + "Build, test and upload the LTS (major) snapshot" + ,cmnd completeBuild + (pure (LTS Minor)) + "lts-minor" + "Build, test and upload the LTS (minor) snapshot" + ,cmnd (const justCheck) + (pure ()) + "check" + "Just check that the build plan is ok"]) + cmnd exec parse name desc = + (command name + (info (fmap exec parse) + (progDesc desc))) diff --git a/stackage.cabal b/stackage.cabal index 842cdbd7..e02a3ab2 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -68,6 +68,7 @@ executable stackage main-is: stackage.hs build-depends: base , stackage + , optparse-applicative >= 0.11 ghc-options: -rtsopts -threaded -with-rtsopts=-N test-suite spec From c42b61bd4c1fd3fe88bb5355c7ce4ffdb7ecbbdc Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 19:33:59 +0100 Subject: [PATCH 021/233] Reformat stackage.hs in tibbe style @snoyberg Not bad, ran this through hindent --johan-tibell, looks legit. Looks like you wrote it =) --- app/stackage.hs | 82 ++++++++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/app/stackage.hs b/app/stackage.hs index c324221e..386c5644 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE TupleSections #-} + module Main where import Control.Monad @@ -9,38 +11,54 @@ import Stackage.CompleteBuild main :: IO () main = - join (execParser - (info (helpOption <*> versionOption <*> config) - (header "Stackage" <> - fullDesc))) - where helpOption = - abortOption - ShowHelpText - (long "help" <> - help "Show this help text") - versionOption = - infoOption + join $ + execParser $ + info + (helpOption <*> versionOption <*> config) + (header "Stackage" <> + fullDesc) + where + helpOption = + abortOption ShowHelpText $ + long "help" <> + help "Show this help text" + versionOption = + infoOption ("fpbuild version " ++ showVersion version) (long "version" <> help "Show fpbuild version") - config = - subparser (mconcat [cmnd completeBuild - (pure Nightly) - "nightly" - "Build, test and upload the Nightly snapshot" - ,cmnd completeBuild - (pure (LTS Major)) - "lts-major" - "Build, test and upload the LTS (major) snapshot" - ,cmnd completeBuild - (pure (LTS Minor)) - "lts-minor" - "Build, test and upload the LTS (minor) snapshot" - ,cmnd (const justCheck) - (pure ()) - "check" - "Just check that the build plan is ok"]) - cmnd exec parse name desc = - (command name - (info (fmap exec parse) - (progDesc desc))) + config = + subparser $ + mconcat + [ cmnd + (uncurry completeBuild) + (fmap (Nightly, ) buildFlags) + "nightly" + "Build, test and upload the Nightly snapshot" + , cmnd + (uncurry completeBuild) + (fmap (LTS Major, ) buildFlags) + "lts-major" + "Build, test and upload the LTS (major) snapshot" + , cmnd + (uncurry completeBuild) + (fmap (LTS Minor, ) buildFlags) + "lts-minor" + "Build, test and upload the LTS (minor) snapshot" + , cmnd + (const justCheck) + (pure ()) + "check" + "Just check that the build plan is ok"] + cmnd exec parse name desc = + command name $ + info + (fmap exec parse) + (progDesc desc) + buildFlags = + BuildFlags <$> + fmap + not + (switch + (long "skip-tests" <> + help "Skip build and running the test suites")) From 787db34739adda4bb0a5db99f7bb6db22b654bf6 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 19:35:25 +0100 Subject: [PATCH 022/233] Add --skip-flags and pbEnableTests (#3976) --- Stackage/CompleteBuild.hs | 11 +++++++++-- Stackage/PerformBuild.hs | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index c1b087ac..39930292 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -4,6 +4,7 @@ module Stackage.CompleteBuild ( BuildType (..) , BumpType (..) + , BuildFlags (..) , completeBuild , justCheck ) where @@ -24,6 +25,11 @@ import Stackage.UpdateBuildPlan import Stackage.Upload import System.IO (BufferMode (LineBuffering), hSetBuffering) +-- | Flags passed in from the command line. +data BuildFlags = BuildFlags + { bfEnableTests :: !Bool + } deriving (Show) + data BuildType = Nightly | LTS BumpType deriving (Show, Read, Eq, Ord) @@ -149,8 +155,8 @@ justCheck = withManager tlsManagerSettings $ \man -> do putStrLn "Plan seems valid!" -completeBuild :: BuildType -> IO () -completeBuild buildType = withManager tlsManagerSettings $ \man -> do +completeBuild :: BuildType -> BuildFlags -> IO () +completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do hSetBuffering stdout LineBuffering putStrLn $ "Loading settings for: " ++ tshow buildType @@ -170,6 +176,7 @@ completeBuild buildType = withManager tlsManagerSettings $ \man -> do , pbLog = hPut stdout , pbJobs = 8 , pbGlobalInstall = False + , pbEnableTests = bfEnableTests buildFlags } performBuild pb >>= mapM_ putStrLn diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 31602d55..d24a1d4a 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -61,6 +61,7 @@ data PerformBuild = PerformBuild , pbJobs :: Int , pbGlobalInstall :: Bool -- ^ Register packages in the global database + , pbEnableTests :: Bool } data PackageInfo = PackageInfo @@ -378,7 +379,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = runTests = wf testOut $ \outH -> do let run = runChild outH - when (pcTests /= Don'tBuild) $ do + when (pbEnableTests && pcTests /= Don'tBuild) $ do log' $ "Test configure " ++ namever run "cabal" $ "configure" : "--enable-tests" : configArgs From a16bc2b13f137723e5664ee1cc4cddb9836ff2ba Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 19:36:32 +0100 Subject: [PATCH 023/233] Add .dir-locals.el for emacs style conformance --- .dir-locals.el | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000..101363c1 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,3 @@ +((haskell-mode . ((haskell-process-type . cabal-repl) + (haskell-indent-spaces . 4) + (hindent-style . "johan-tibell")))) From fb73435572b76a665dc3a2c079e2be3cdff1eb15 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 19:42:53 +0100 Subject: [PATCH 024/233] Split off uploading into separate finallyUpload --- Stackage/CompleteBuild.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 39930292..b7b5550e 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -155,12 +155,14 @@ justCheck = withManager tlsManagerSettings $ \man -> do putStrLn "Plan seems valid!" +-- | Make a complete plan, build, test and upload bundle, docs and +-- distro. completeBuild :: BuildType -> BuildFlags -> IO () completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do hSetBuffering stdout LineBuffering putStrLn $ "Loading settings for: " ++ tshow buildType - Settings {..} <- getSettings man buildType + settings@Settings {..} <- getSettings man buildType putStrLn $ "Writing build plan to: " ++ fpToText planFile encodeFile (fpToString planFile) plan @@ -180,6 +182,12 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do } performBuild pb >>= mapM_ putStrLn + finallyUpload settings man pb + +-- | The final part of the complete build process: uploading a bundle, +-- docs and a distro to hackage. +finallyUpload :: Settings -> Manager -> PerformBuild -> IO () +finallyUpload Settings{..} man pb = do putStrLn "Uploading bundle to Stackage Server" token <- readFile "/auth-token" now <- epochTime From 1f2824540e5ab7277c056696bc4189ba110bd53c Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 19:44:41 +0100 Subject: [PATCH 025/233] Add --skip-upload flag Easier for testing stackage the executable/library itself. --- Stackage/CompleteBuild.hs | 4 +++- app/stackage.hs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index b7b5550e..74717fab 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -28,6 +28,7 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering) -- | Flags passed in from the command line. data BuildFlags = BuildFlags { bfEnableTests :: !Bool + , bfDoUpload :: !Bool } deriving (Show) data BuildType = Nightly | LTS BumpType @@ -182,7 +183,8 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do } performBuild pb >>= mapM_ putStrLn - finallyUpload settings man pb + when (bfDoUpload buildFlags) $ + finallyUpload settings man pb -- | The final part of the complete build process: uploading a bundle, -- docs and a distro to hackage. diff --git a/app/stackage.hs b/app/stackage.hs index 386c5644..e5ce61ca 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -61,4 +61,9 @@ main = not (switch (long "skip-tests" <> - help "Skip build and running the test suites")) + help "Skip build and running the test suites")) <*> + fmap + not + (switch + (long "skip-upload" <> + help "Skip uploading bundle, docs, etc.")) From 335fa913850d4139d1c4c467311890c3925f3574 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 22:14:57 +0100 Subject: [PATCH 026/233] Add library profiling support #3973 * Implements --enable-library-profiling in the executable * Adds pbEnableLibProfiling * Adds ability to skip profiling on some packages, e.g. skipped-profiling: - transformers-compat --- Stackage/BuildConstraints.hs | 17 +++++++++++------ Stackage/CompleteBuild.hs | 6 ++++-- Stackage/PerformBuild.hs | 3 +++ Stackage/UpdateBuildPlan.hs | 1 + app/stackage.hs | 5 ++++- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index 94baca9e..0da8eebd 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -88,12 +88,13 @@ data BuildConstraints = BuildConstraints } data PackageConstraints = PackageConstraints - { pcVersionRange :: VersionRange - , pcMaintainer :: Maybe Maintainer - , pcTests :: TestState - , pcHaddocks :: TestState - , pcBuildBenchmarks :: Bool - , pcFlagOverrides :: Map FlagName Bool + { pcVersionRange :: VersionRange + , pcMaintainer :: Maybe Maintainer + , pcTests :: TestState + , pcHaddocks :: TestState + , pcBuildBenchmarks :: Bool + , pcFlagOverrides :: Map FlagName Bool + , pcEnableLibProfile :: Bool } deriving (Show, Eq) instance ToJSON PackageConstraints where @@ -115,6 +116,7 @@ instance FromJSON PackageConstraints where pcBuildBenchmarks <- o .: "build-benchmarks" pcFlagOverrides <- Map.mapKeysWith const mkFlagName <$> o .: "flags" pcMaintainer <- o .:? "maintainer" + pcEnableLibProfile <- fmap (fromMaybe False) (o .:? "library-profiling") return PackageConstraints {..} -- | The proposed plan from the requirements provided by contributors. @@ -152,6 +154,7 @@ data ConstraintFile = ConstraintFile , cfSkippedBenchmarks :: Set PackageName , cfPackages :: Map Maintainer (Vector Dependency) , cfGithubUsers :: Map Text (Set Text) + , cfSkippedLibProfiling :: Set PackageName } instance FromJSON ConstraintFile where @@ -162,6 +165,7 @@ instance FromJSON ConstraintFile where cfExpectedTestFailures <- getPackages o "expected-test-failures" cfExpectedHaddockFailures <- getPackages o "expected-haddock-failures" cfSkippedBenchmarks <- getPackages o "skipped-benchmarks" + cfSkippedLibProfiling <- getPackages o "skipped-profiling" cfPackages <- o .: "packages" >>= mapM (mapM toDep) . Map.mapKeysWith const Maintainer @@ -196,6 +200,7 @@ toBC ConstraintFile {..} = do mpair = lookup name revmap pcMaintainer = fmap fst mpair pcVersionRange = maybe anyVersion snd mpair + pcEnableLibProfile = not (name `member` cfSkippedLibProfiling) pcTests | name `member` cfSkippedTests = Don'tBuild | name `member` cfExpectedTestFailures = ExpectFailure diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 74717fab..20dec4bf 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -27,8 +27,9 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering) -- | Flags passed in from the command line. data BuildFlags = BuildFlags - { bfEnableTests :: !Bool - , bfDoUpload :: !Bool + { bfEnableTests :: !Bool + , bfDoUpload :: !Bool + , bfEnableLibProfile :: !Bool } deriving (Show) data BuildType = Nightly | LTS BumpType @@ -180,6 +181,7 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do , pbJobs = 8 , pbGlobalInstall = False , pbEnableTests = bfEnableTests buildFlags + , pbEnableLibProfiling = bfEnableLibProfile buildFlags } performBuild pb >>= mapM_ putStrLn diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index d24a1d4a..e5e1c23b 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -62,6 +62,7 @@ data PerformBuild = PerformBuild , pbGlobalInstall :: Bool -- ^ Register packages in the global database , pbEnableTests :: Bool + , pbEnableLibProfiling :: Bool } data PackageInfo = PackageInfo @@ -299,6 +300,8 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = tell' $ "--datadir=" ++ fpToText (pbDataDir pb) tell' $ "--docdir=" ++ fpToText (pbDocDir pb) tell' $ "--flags=" ++ flags + when (pbEnableLibProfiling && pcEnableLibProfile) $ + tell' "--enable-library-profiling" where tell' x = tell (x:) diff --git a/Stackage/UpdateBuildPlan.hs b/Stackage/UpdateBuildPlan.hs index 617560b5..a1615b11 100644 --- a/Stackage/UpdateBuildPlan.hs +++ b/Stackage/UpdateBuildPlan.hs @@ -33,6 +33,7 @@ updateBuildConstraints BuildPlan {..} = , pcHaddocks = maybe ExpectSuccess pcHaddocks moldPC , pcBuildBenchmarks = maybe True pcBuildBenchmarks moldPC , pcFlagOverrides = maybe mempty pcFlagOverrides moldPC + , pcEnableLibProfile = maybe False pcEnableLibProfile moldPC } where moldBP = lookup name bpPackages diff --git a/app/stackage.hs b/app/stackage.hs index e5ce61ca..2a06c2bd 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -66,4 +66,7 @@ main = not (switch (long "skip-upload" <> - help "Skip uploading bundle, docs, etc.")) + help "Skip uploading bundle, docs, etc.")) <*> + switch + (long "enable-library-profiling" <> + help "Enable profiling when building") From 5712c2172ab9722edd9586f982aff007d282f38a Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 31 Dec 2014 22:17:45 +0100 Subject: [PATCH 027/233] Add simple verbose mode (-v) for debugging --- Stackage/CompleteBuild.hs | 2 ++ Stackage/PerformBuild.hs | 4 +++- app/stackage.hs | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 20dec4bf..19e90c43 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -30,6 +30,7 @@ data BuildFlags = BuildFlags { bfEnableTests :: !Bool , bfDoUpload :: !Bool , bfEnableLibProfile :: !Bool + , bfVerbose :: !Bool } deriving (Show) data BuildType = Nightly | LTS BumpType @@ -182,6 +183,7 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do , pbGlobalInstall = False , pbEnableTests = bfEnableTests buildFlags , pbEnableLibProfiling = bfEnableLibProfile buildFlags + , pbVerbose = bfVerbose buildFlags } performBuild pb >>= mapM_ putStrLn diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index e5e1c23b..7cdb3efd 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -63,6 +63,7 @@ data PerformBuild = PerformBuild -- ^ Register packages in the global database , pbEnableTests :: Bool , pbEnableLibProfiling :: Bool + , pbVerbose :: Bool } data PackageInfo = PackageInfo @@ -316,7 +317,8 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = PackageConstraints {..} = ppConstraints $ piPlan sbPackageInfo buildLibrary = wf libOut $ \outH -> do - let run = runChild outH + let run a b = do when pbVerbose $ log' (unwords (a : b)) + runChild outH a b log' $ "Unpacking " ++ namever runParent outH "cabal" ["unpack", namever] diff --git a/app/stackage.hs b/app/stackage.hs index 2a06c2bd..08efe846 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -69,4 +69,7 @@ main = help "Skip uploading bundle, docs, etc.")) <*> switch (long "enable-library-profiling" <> - help "Enable profiling when building") + help "Enable profiling when building") <*> + switch + (long "verbose" <> short 'v' <> + help "Output verbose detail about the build steps") From 3ff5e04039bad1cef0a941a0d99da3a8b0c4f01f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 1 Jan 2015 11:57:17 +0200 Subject: [PATCH 028/233] Add expected test suite failure jswebtools/language-ecmascript#60 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index b7022782..f8faf208 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -856,6 +856,9 @@ expected-test-failures: # https://github.com/vincenthz/hs-crypto-pubkey/issues/17 - crypto-pubkey + # https://github.com/jswebtools/language-ecmascript/issues/60 + - language-ecmascript + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 55f2b44d3be97da71fe42f8e19180f1637d5a86c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 1 Jan 2015 16:48:19 +0200 Subject: [PATCH 029/233] haddocks fixed --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index f8faf208..0dda583b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -867,9 +867,6 @@ expected-haddock-failures: # https://github.com/ekmett/gl/issues/4 - gl - # https://github.com/fpco/stackage/issues/385 - - HaXml - # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From ae568f96893e9e9779137cef2400f6b8fdf3d04d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 08:15:17 +0200 Subject: [PATCH 030/233] Upper bound for #390 --- build-constraints.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0dda583b..cc7e8dfc 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -644,6 +644,11 @@ packages: # https://github.com/fpco/stackage/issues/389 - lens < 4.7 + # https://github.com/fpco/stackage/issues/390 + # NOTE: When this issue is resolved, remove the expected test failure + # for language-ecmascript as well. + - language-ecmascript < 0.17 + # Global flags are applied to all packages global-flags: blaze_html_0_5: true From b76d7e97205921bdf4673417b33b15c4d85cca41 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 08:25:25 +0200 Subject: [PATCH 031/233] Some comments regarding GHC 7.10 --- build-constraints.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index cc7e8dfc..a51518a3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -2,7 +2,7 @@ packages: "Michael Snoyman michael@snoyman.com @snoyberg": - bzlib-conduit - - cabal-install < 1.19 + - cabal-install < 1.19 # GHC 7.10 bumpd to 1.22 - cabal-src - case-insensitive - classy-prelude-yesod @@ -254,7 +254,7 @@ packages: - monad-products - monad-st - monad-st - - mtl < 2.2 + - mtl < 2.2 # GHC 7.10 bump - nats - numeric-extras - parsers @@ -577,7 +577,7 @@ packages: - hasql-backend - hasql-postgres - list-t - - mtl-prelude < 2 + - mtl-prelude < 2 # GHC 7.10 bump - neat-interpolation - partial-handler - postgresql-binary From 8bca1ec5c83d9f53204cb50b7b28e32e84399e86 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 08:29:54 +0200 Subject: [PATCH 032/233] Add empty skipped-profiling section @chrisdone this is now necessary, correct? --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index a51518a3..d66b2a35 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -898,6 +898,8 @@ skipped-benchmarks: # sometimes falls out-of-sync on hasql-postgres - hasql +skipped-profiling: [] + # Mapping from Github account holding a package to the Github users who should # be pinged on failure. If no value is specified here, then the owning account # will be pinged. From 5d7b7b50826994ab80e3992ebf5cd41d31c06005 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 08:19:36 +0200 Subject: [PATCH 033/233] Set a flag for storable-complex --- build-constraints.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index d66b2a35..2e2643ab 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -678,6 +678,12 @@ package-flags: simplelocalnet: true p2p: true + # GHC 7.10: Remove this + # Note that the flag is lower-cased, because that's what Cabal does + # Perhaps the codebase should automatically lower case flag names? + storable-complex: + instanceinbase: false + # By skipping a test suite, we do not pull in the build dependencies skipped-tests: - ReadArgs # old version of hspec From d39b7bf2040c2c3e8fcc762716b703eb08e50f68 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 09:11:17 +0200 Subject: [PATCH 034/233] Remove all global flags, just use package flags --- Stackage/BuildConstraints.hs | 7 ++----- build-constraints.yaml | 32 ++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index 0da8eebd..0c7d492f 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -146,8 +146,7 @@ getSystemInfo = do siArch = Distribution.System.X86_64 data ConstraintFile = ConstraintFile - { cfGlobalFlags :: Map FlagName Bool - , cfPackageFlags :: Map PackageName (Map FlagName Bool) + { cfPackageFlags :: Map PackageName (Map FlagName Bool) , cfSkippedTests :: Set PackageName , cfExpectedTestFailures :: Set PackageName , cfExpectedHaddockFailures :: Set PackageName @@ -159,7 +158,6 @@ data ConstraintFile = ConstraintFile instance FromJSON ConstraintFile where parseJSON = withObject "ConstraintFile" $ \o -> do - cfGlobalFlags <- goFlagMap <$> o .: "global-flags" cfPackageFlags <- (goPackageMap . fmap goFlagMap) <$> o .: "package-flags" cfSkippedTests <- getPackages o "skipped-tests" cfExpectedTestFailures <- getPackages o "expected-test-failures" @@ -210,7 +208,6 @@ toBC ConstraintFile {..} = do | name `member` cfExpectedHaddockFailures = ExpectFailure | otherwise = ExpectSuccess - pcFlagOverrides = fromMaybe mempty (lookup name cfPackageFlags) ++ - cfGlobalFlags + pcFlagOverrides = fromMaybe mempty $ lookup name cfPackageFlags bcGithubUsers = cfGithubUsers diff --git a/build-constraints.yaml b/build-constraints.yaml index 2e2643ab..41c4d365 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -649,18 +649,6 @@ packages: # for language-ecmascript as well. - language-ecmascript < 0.17 -# Global flags are applied to all packages -global-flags: - blaze_html_0_5: true - small_base: true - https: true - splitbase: true - old-locale: true - new-base: true - bytestring-in-base: false - test-hlint: false - network-uri: true - # Package flags are applied to individual packages, and override the values of # global-flags package-flags: @@ -684,6 +672,26 @@ package-flags: storable-complex: instanceinbase: false + logfloat: + splitbase: true + + curl: + new-base: true + + # GHC 7.10 remove + aeson: + old-locale: true + + hxt: + network-uri: true + hxt-http: + network-uri: true + hxt-relaxng: + network-uri: true + + pandoc: + https: true + # By skipping a test suite, we do not pull in the build dependencies skipped-tests: - ReadArgs # old version of hspec From 9c93a258f7b390d295f148c1d13c2b6ea5f14d21 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 09:49:58 +0200 Subject: [PATCH 035/233] Revert "haddocks fixed" This reverts commit 55f2b44d3be97da71fe42f8e19180f1637d5a86c. --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 41c4d365..999a2978 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -886,6 +886,9 @@ expected-haddock-failures: # https://github.com/ekmett/gl/issues/4 - gl + # https://github.com/fpco/stackage/issues/385 + - HaXml + # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From d52fdfffdf795c5e67c13ec1b4a322e19abb8f64 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 11:58:37 +0200 Subject: [PATCH 036/233] Version bump --- ChangeLog.md | 6 ++++++ stackage.cabal | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 2a524e11..bc6d7be2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,9 @@ +## 0.4.0 + +* Command line uses optparse-applicative with additional options +* Library profiling support during build +* Remove cfGlobalFlags (just use package-specific flags) + ## 0.3.1 * Added `justCheck` and `stackage check` command line. diff --git a/stackage.cabal b/stackage.cabal index e02a3ab2..7c4831c9 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.3.1 +version: 0.4.0 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 243ae9c3b643f61b36f0b4ca5cf6d346bee947ae Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Jan 2015 12:04:10 +0200 Subject: [PATCH 037/233] Fix a serialization bug (pinging @chrisdone) --- Stackage/BuildConstraints.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index 0c7d492f..3b3f0d01 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -104,6 +104,7 @@ instance ToJSON PackageConstraints where , "haddocks" .= pcHaddocks , "build-benchmarks" .= pcBuildBenchmarks , "flags" .= Map.mapKeysWith const unFlagName pcFlagOverrides + , "library-profiling" .= pcEnableLibProfile ] where addMaintainer = maybe id (\m -> (("maintainer" .= m):)) pcMaintainer From 378c7ec556ee3aaf9211bcdadc8b1a4c09bfe6b3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 3 Jan 2015 19:18:53 +0200 Subject: [PATCH 038/233] HaXml documentation is really fixed this time --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 999a2978..41c4d365 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -886,9 +886,6 @@ expected-haddock-failures: # https://github.com/ekmett/gl/issues/4 - gl - # https://github.com/fpco/stackage/issues/385 - - HaXml - # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From 7d22293348acc21ada8c64911ddfedd13e11ed95 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 4 Jan 2015 08:40:15 +0200 Subject: [PATCH 039/233] Add mutable-containers --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 41c4d365..aa838fd8 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -45,6 +45,7 @@ packages: - cereal-conduit - binary-conduit - lzma-conduit + - mutable-containers "FP Complete michael@fpcomplete.com @snoyberg": - alex From 2b5cc3101095fcc4f8ad5a66b0c48c89b70b2e8b Mon Sep 17 00:00:00 2001 From: Chris Done Date: Sun, 4 Jan 2015 15:38:58 +0100 Subject: [PATCH 040/233] Add back hopenpgp-tools (#319) --- build-constraints.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index aa838fd8..923ea7cb 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -454,8 +454,7 @@ packages: - openpgp-asciiarmor - MusicBrainz - DAV - # https://github.com/fpco/stackage/issues/319 - # - hopenpgp-tools + - hopenpgp-tools # https://github.com/fpco/stackage/issues/160 "Ketil Malde": @@ -625,7 +624,7 @@ packages: "Marcin Mrotek ": - type-list - + "David Turner ": - alarmclock - bank-holidays-england From 6801aff76f67a1b6a005bd14be21cd6981b65400 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Sun, 4 Jan 2015 16:51:36 +0100 Subject: [PATCH 041/233] Add servant packages. --- build-constraints.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 923ea7cb..6229707f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -629,6 +629,13 @@ packages: - alarmclock - bank-holidays-england + "Haskell Servant jkarni@gmail.com @jkarni": + - servant + - servant-client + - servant-docs + - servant-jquery + - servant-server + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From a99cd7dc765252bb6b9f182b879fd92087ef1b32 Mon Sep 17 00:00:00 2001 From: Alexandr Ruchkin Date: Sun, 4 Jan 2015 19:36:15 +0300 Subject: [PATCH 042/233] Adding hdocs and hsdev packages. Subj --- build-constraints.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6229707f..73fd4251 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -636,6 +636,10 @@ packages: - servant-jquery - servant-server + "Alexandr Ruchkin voidex@live.com @mvoidex": + - hdocs + - hsdev + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From ee9bc2bbed4ed004b917d3a3ef63bf8853bf2542 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Sun, 4 Jan 2015 20:49:14 +0100 Subject: [PATCH 043/233] Document Stackage.CheckBuildPlan --- Stackage/CheckBuildPlan.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Stackage/CheckBuildPlan.hs b/Stackage/CheckBuildPlan.hs index 1ad76b27..f13265aa 100644 --- a/Stackage/CheckBuildPlan.hs +++ b/Stackage/CheckBuildPlan.hs @@ -19,6 +19,7 @@ import Stackage.Prelude -- FIXME check cycles in dependencies, only looking at libraries and -- executables +-- | Check the build plan for missing deps, wrong versions, etc. checkBuildPlan :: MonadThrow m => BuildPlan -> m () checkBuildPlan BuildPlan {..} | null errs' = return () @@ -28,6 +29,10 @@ checkBuildPlan BuildPlan {..} errs@(BadBuildPlan errs') = execWriter $ mapM_ (checkDeps allPackages) $ mapToList bpPackages +-- | For a given package name and plan, check that its dependencies are: +-- +-- 1. Existent (existing in the provided package map) +-- 2. Within version range checkDeps :: Map PackageName Version -> (PackageName, PackagePlan) -> Writer BadBuildPlan () From 5da6e5cfa463c0ae12ca947ab2577b6f00e36db2 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Sun, 4 Jan 2015 21:39:15 +0100 Subject: [PATCH 044/233] Dependency injection of newBuildPlan (#375) --- Stackage/BuildPlan.hs | 13 ++++++++++--- Stackage/CompleteBuild.hs | 15 +++++++++++---- Stackage/UpdateBuildPlan.hs | 5 +++-- test/Stackage/BuildPlanSpec.hs | 5 +++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Stackage/BuildPlan.hs b/Stackage/BuildPlan.hs index 27868f06..b8bc5376 100644 --- a/Stackage/BuildPlan.hs +++ b/Stackage/BuildPlan.hs @@ -14,6 +14,7 @@ module Stackage.BuildPlan , PackagePlan (..) , newBuildPlan , makeToolMap + , getLatestAllowedPlans ) where import Control.Monad.State.Strict (execState, get, put) @@ -90,9 +91,9 @@ instance FromJSON PackagePlan where ppDesc <- o .: "description" return PackagePlan {..} -newBuildPlan :: MonadIO m => BuildConstraints -> m BuildPlan -newBuildPlan bc@BuildConstraints {..} = liftIO $ do - packagesOrig <- getLatestDescriptions (isAllowed bc) (mkPackagePlan bc) +-- | Make a build plan given these package set and build constraints. +newBuildPlan :: MonadIO m => Map PackageName PackagePlan -> BuildConstraints -> m BuildPlan +newBuildPlan packagesOrig bc@BuildConstraints {..} = liftIO $ do let toolMap = makeToolMap packagesOrig packages = populateUsers $ removeUnincluded bc toolMap packagesOrig toolNames :: [ExeName] @@ -205,3 +206,9 @@ mkPackagePlan bc gpd = do getFlag MkFlag {..} = (flagName, fromMaybe flagDefault $ lookup flagName overrides) flags = mapFromList $ map getFlag $ genPackageFlags gpd + +getLatestAllowedPlans :: MonadIO m => BuildConstraints -> m (Map PackageName PackagePlan) +getLatestAllowedPlans bc = + getLatestDescriptions + (isAllowed bc) + (mkPackagePlan bc) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 19e90c43..0d62bdbd 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -54,7 +54,9 @@ getSettings :: Manager -> BuildType -> IO Settings getSettings man Nightly = do day <- tshow . utctDay <$> getCurrentTime let slug' = "nightly-" ++ day - plan' <- defaultBuildConstraints man >>= newBuildPlan + bc <- defaultBuildConstraints man + pkgs <- getLatestAllowedPlans bc + plan' <- newBuildPlan pkgs bc return Settings { planFile = fpFromText ("nightly-" ++ day) <.> "yaml" , buildDir = fpFromText $ "builds/stackage-nightly-" ++ day @@ -81,14 +83,18 @@ getSettings man (LTS bumpType) = do case mlts of Nothing -> LTSVer 0 0 Just (LTSVer x _) -> LTSVer (x + 1) 0 - plan' <- defaultBuildConstraints man >>= newBuildPlan + bc <- defaultBuildConstraints man + pkgs <- getLatestAllowedPlans bc + plan' <- newBuildPlan pkgs bc return (new, plan') Minor -> do old <- maybe (error "No LTS plans found in current directory") return mlts oldplan <- decodeFileEither (fpToString $ renderLTSVer old) >>= either throwM return let new = incrLTSVer old - plan' <- updateBuildPlan oldplan + let bc = updateBuildConstraints oldplan + pkgs <- getLatestAllowedPlans bc + plan' <- newBuildPlan pkgs bc return (new, plan') let newfile = renderLTSVer new @@ -148,7 +154,8 @@ justCheck = withManager tlsManagerSettings $ \man -> do bc <- defaultBuildConstraints man putStrLn "Creating build plan" - plan <- newBuildPlan bc + plans <- getLatestAllowedPlans bc + plan <- newBuildPlan plans bc putStrLn $ "Writing build plan to check-plan.yaml" encodeFile "check-plan.yaml" plan diff --git a/Stackage/UpdateBuildPlan.hs b/Stackage/UpdateBuildPlan.hs index a1615b11..8c67c5ef 100644 --- a/Stackage/UpdateBuildPlan.hs +++ b/Stackage/UpdateBuildPlan.hs @@ -15,8 +15,9 @@ import Stackage.BuildConstraints import Stackage.BuildPlan import Stackage.Prelude -updateBuildPlan :: BuildPlan -> IO BuildPlan -updateBuildPlan = newBuildPlan . updateBuildConstraints +updateBuildPlan :: Map PackageName PackagePlan -> BuildPlan -> IO BuildPlan +updateBuildPlan packagesOrig + = newBuildPlan packagesOrig . updateBuildConstraints updateBuildConstraints :: BuildPlan -> BuildConstraints updateBuildConstraints BuildPlan {..} = diff --git a/test/Stackage/BuildPlanSpec.hs b/test/Stackage/BuildPlanSpec.hs index aa33c8dd..7c87d6d3 100644 --- a/test/Stackage/BuildPlanSpec.hs +++ b/test/Stackage/BuildPlanSpec.hs @@ -15,7 +15,8 @@ import Network.HTTP.Client.TLS (tlsManagerSettings) spec :: Spec spec = it "works" $ withManager tlsManagerSettings $ \man -> do bc <- defaultBuildConstraints man - bp <- newBuildPlan bc + pkgs <- getLatestAllowedPlans bc + bp <- newBuildPlan pkgs bc let bs = Y.encode bp ebp' = Y.decodeEither bs @@ -28,7 +29,7 @@ spec = it "works" $ withManager tlsManagerSettings $ \man -> do bpGithubUsers bp' `shouldBe` bpGithubUsers bp when (bp' /= bp) $ error "bp' /= bp" - bp2 <- updateBuildPlan bp + bp2 <- updateBuildPlan pkgs bp when (dropVersionRanges bp2 /= dropVersionRanges bp) $ error "bp2 /= bp" where dropVersionRanges bp = From 45b33ac54d795e69ef2625de1d9aae9628fe6327 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Sun, 4 Jan 2015 22:26:33 +0100 Subject: [PATCH 045/233] Flexible tests for checkBuildPlan (#375) @snoyberg Can you confirm that this simple test suite works for you? I've set this up so that I can then add some cyclic dependencies and add an occurs check for that, but figured I'd setup tests for some of the existing invariants first. Should be like: $ cabal test --ghc-options=-O0; cat dist/test/stackage-0.4.0-spec.log Building stackage-0.4.0... Preprocessing library stackage-0.4.0... In-place registering stackage-0.4.0... Preprocessing executable 'stackage' for stackage-0.4.0... Preprocessing test suite 'spec' for stackage-0.4.0... [3 of 4] Compiling Stackage.BuildPlanSpec ( test/Stackage/BuildPlanSpec.hs, dist/build/spec/spec-tmp/Stackage/BuildPlanSpec.o ) Linking dist/build/spec/spec ... Running 1 test suites... Test suite spec: RUNNING... Test suite spec: PASS Test suite logged to: dist/test/stackage-0.4.0-spec.log 1 of 1 test suites (1 of 1 test cases) passed. Test suite spec: RUNNING... Stackage.BuildPlan simple package set bad version range on depdendency fails nonexistent package fails to check default package set checks ok Stackage.CorePackages works contains known core packages getCoreExecutables includes known executables Stackage.PackageIndex works getLatestDescriptions gives reasonable results Finished in 14.3302 seconds 9 examples, 0 failures Test suite spec: PASS Test suite logged to: dist/test/stackage-0.4.0-spec.log --- Stackage/BuildConstraints.hs | 1 + Stackage/CheckBuildPlan.hs | 1 + test/Stackage/BuildPlanSpec.hs | 124 +++++++++++++++++++++++++++---- test/test-build-constraints.yaml | 20 +++++ 4 files changed, 131 insertions(+), 15 deletions(-) create mode 100644 test/test-build-constraints.yaml diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index 3b3f0d01..674ac395 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -10,6 +10,7 @@ module Stackage.BuildConstraints , SystemInfo (..) , getSystemInfo , defaultBuildConstraints + , toBC ) where import Control.Monad.Writer.Strict (execWriter, tell) diff --git a/Stackage/CheckBuildPlan.hs b/Stackage/CheckBuildPlan.hs index f13265aa..ea656a9c 100644 --- a/Stackage/CheckBuildPlan.hs +++ b/Stackage/CheckBuildPlan.hs @@ -7,6 +7,7 @@ -- | Confirm that a build plan has a consistent set of dependencies. module Stackage.CheckBuildPlan ( checkBuildPlan + , BadBuildPlan ) where import Control.Monad.Writer.Strict (Writer, execWriter, tell) diff --git a/test/Stackage/BuildPlanSpec.hs b/test/Stackage/BuildPlanSpec.hs index 7c87d6d3..99679801 100644 --- a/test/Stackage/BuildPlanSpec.hs +++ b/test/Stackage/BuildPlanSpec.hs @@ -1,22 +1,56 @@ +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-} module Stackage.BuildPlanSpec (spec) where -import Stackage.BuildPlan -import Stackage.Prelude -import Stackage.BuildConstraints -import Stackage.UpdateBuildPlan -import Test.Hspec -import qualified Data.Yaml as Y -import Distribution.Version (anyVersion) import qualified Data.Map as Map -import Network.HTTP.Client (withManager) -import Network.HTTP.Client.TLS (tlsManagerSettings) +import qualified Data.Map.Strict as M +import qualified Data.Set as S +import Data.Yaml +import qualified Data.Yaml as Y +import Distribution.Version +import Network.HTTP.Client +import Network.HTTP.Client.TLS (tlsManagerSettings) +import Stackage.BuildConstraints +import Stackage.BuildPlan +import Stackage.CheckBuildPlan +import Stackage.PackageDescription +import Stackage.Prelude +import Stackage.UpdateBuildPlan +import Test.Hspec spec :: Spec -spec = it "works" $ withManager tlsManagerSettings $ \man -> do - bc <- defaultBuildConstraints man - pkgs <- getLatestAllowedPlans bc - bp <- newBuildPlan pkgs bc +spec = do + it "simple package set" $ check testBuildConstraints $ makePackageSet + [("foo", [0, 0, 0], [("bar", thisV [0, 0, 0])]) + ,("bar", [0, 0, 0], [])] + it "bad version range on depdendency fails" $ badBuildPlan $ makePackageSet + [("foo", [0, 0, 0], [("bar", thisV [1, 1, 0])]) + ,("bar", [0, 0, 0], [])] + it "nonexistent package fails to check" $ badBuildPlan $ makePackageSet + [("foo", [0, 0, 0], [("nonexistent", thisV [0, 0, 0])]) + ,("bar", [0, 0, 0], [])] + it "default package set checks ok" $ check defaultBuildConstraints getLatestAllowedPlans + +-- | Checking should be considered a bad build plan. +badBuildPlan :: (BuildConstraints -> IO (Map PackageName PackagePlan)) + -> void + -> IO () +badBuildPlan m _ = do + mu <- try (check testBuildConstraints m) + case mu of + Left (_ :: BadBuildPlan) -> + return () + Right () -> + error "Expected bad build plan." + +-- | Check build plan with the given package set getter. +check :: (Manager -> IO BuildConstraints) + -> (BuildConstraints -> IO (Map PackageName PackagePlan)) + -> IO () +check readPlanFile getPlans = withManager tlsManagerSettings $ \man -> do + bc <- readPlanFile man + plans <- getPlans bc + bp <- newBuildPlan plans bc let bs = Y.encode bp ebp' = Y.decodeEither bs @@ -26,14 +60,74 @@ spec = it "works" $ withManager tlsManagerSettings $ \man -> do forM_ allPackages $ \name -> (name, lookup name (bpPackages bp')) `shouldBe` (name, lookup name (bpPackages bp)) - bpGithubUsers bp' `shouldBe` bpGithubUsers bp + when (bp' /= bp) $ error "bp' /= bp" - bp2 <- updateBuildPlan pkgs bp + bp2 <- updateBuildPlan plans bp when (dropVersionRanges bp2 /= dropVersionRanges bp) $ error "bp2 /= bp" + checkBuildPlan bp where dropVersionRanges bp = bp { bpPackages = map go $ bpPackages bp } where go pb = pb { ppConstraints = go' $ ppConstraints pb } go' pc = pc { pcVersionRange = anyVersion } + +-- | Make a package set from a convenient data structure. +makePackageSet + :: [(String,[Int],[(String,VersionRange)])] + -> BuildConstraints + -> IO (Map PackageName PackagePlan) +makePackageSet ps _ = + return $ + M.fromList $ + map + (\(name,ver,deps) -> + ( PackageName name + , dummyPackage ver $ + M.fromList $ + map + (\(dname,dver) -> + ( PackageName dname + , DepInfo {diComponents = S.fromList + [CompLibrary] + ,diRange = dver})) + deps)) + ps + where + dummyPackage v deps = + PackagePlan + {ppVersion = Version v [] + ,ppGithubPings = mempty + ,ppUsers = mempty + ,ppConstraints = + PackageConstraints + {pcVersionRange = anyV + ,pcMaintainer = Nothing + ,pcTests = Don'tBuild + ,pcHaddocks = Don'tBuild + ,pcBuildBenchmarks = False + ,pcFlagOverrides = mempty + ,pcEnableLibProfile = False} + ,ppDesc = + SimpleDesc + {sdPackages = deps + ,sdTools = mempty + ,sdProvidedExes = mempty + ,sdModules = mempty}} + +-- | This exact version is required. +thisV :: [Int] -> VersionRange +thisV ver = thisVersion (Version ver []) + +-- | Accept any version. +anyV :: VersionRange +anyV = anyVersion + +-- | Test plan. +testBuildConstraints :: void -> IO BuildConstraints +testBuildConstraints _ = + decodeFileEither + (fpToString fp) >>= + either throwIO toBC + where fp = "test/test-build-constraints.yaml" diff --git a/test/test-build-constraints.yaml b/test/test-build-constraints.yaml new file mode 100644 index 00000000..de831eaf --- /dev/null +++ b/test/test-build-constraints.yaml @@ -0,0 +1,20 @@ +packages: + "Test": + - foo + - bar + +global-flags: [] + +skipped-tests: [] +expected-test-failures: [] +expected-haddock-failures: [] +skipped-benchmarks: [] +skipped-profiling: [] + +github-users: + bar: + - demo + +package-flags: + foo: + demo: true From e7b87bdb9b9b6b7e8f0a95a44527157feafd942f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 14:28:34 +0200 Subject: [PATCH 046/233] Try out Travis --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..6a5da53b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: haskell + +install: + - cabal update + - cabal install -j + +script: stackage check From 4654163df23083bb8d45b1eca6c34648a07f24f3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 14:33:41 +0200 Subject: [PATCH 047/233] Better Travis config? --- .travis.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a5da53b..7b1a1cd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,19 @@ -language: haskell +env: + - CABALVER=1.20 GHCVER=7.8.4 + +# Note: the distinction between `before_install` and `install` is not important. +before_install: + - travis_retry sudo add-apt-repository -y ppa:hvr/ghc + - travis_retry sudo apt-get update + - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH install: - - cabal update - - cabal install -j + - cabal --version + - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" + - travis_retry cabal update + - cabal install -j -script: stackage check +# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. +script: + - stackage check From 7873834d7c75c09fa33193d8339843993ed179e3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 14:40:40 +0200 Subject: [PATCH 048/233] Try to use Travis caching --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7b1a1cd1..7cf659d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,11 @@ env: - CABALVER=1.20 GHCVER=7.8.4 +cache: + directories: + - $HOME/.ghc + - $HOME/.cabal + # Note: the distinction between `before_install` and `install` is not important. before_install: - travis_retry sudo add-apt-repository -y ppa:hvr/ghc @@ -16,4 +21,4 @@ install: # Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. script: - - stackage check + - ./dist/build/stackage/stackage check From e3ff2479808dab0eb08e51781ce169967459300c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 16:44:17 +0200 Subject: [PATCH 049/233] Upper bound for #398 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 73fd4251..1b4d7a9f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -660,6 +660,9 @@ packages: # for language-ecmascript as well. - language-ecmascript < 0.17 + # https://github.com/fpco/stackage/issues/398 + - monoid-subclasses < 0.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From cb9526b2fdf130018714c43fe5129e1185612b05 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 17:08:23 +0200 Subject: [PATCH 050/233] Say "Still Alive" during checking for Travis --- Stackage/CompleteBuild.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 0d62bdbd..74375d5c 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -8,6 +8,9 @@ module Stackage.CompleteBuild , completeBuild , justCheck ) where + +import Control.Concurrent (threadDelay) +import Control.Concurrent.Async (withAsync) import Data.Default.Class (def) import Data.Semigroup (Max (..), Option (..)) import Data.Text.Read (decimal) @@ -145,11 +148,20 @@ renderLTSVer lts = fpFromText $ concat , ".yaml" ] +-- | Just print a message saying "still alive" every second, to appease Travis. +stillAlive :: IO () -> IO () +stillAlive inner = + withAsync printer $ const inner + where + printer = forever $ do + threadDelay 1000000 + putStrLn "Still alive" + -- | Generate and check a new build plan, but do not execute it. -- -- Since 0.3.1 justCheck :: IO () -justCheck = withManager tlsManagerSettings $ \man -> do +justCheck = stillAlive $ withManager tlsManagerSettings $ \man -> do putStrLn "Loading build constraints" bc <- defaultBuildConstraints man From 241d5d72e27ee2abd6d0478d36a1f23132937b6a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 17:18:47 +0200 Subject: [PATCH 051/233] second ==> minute --- Stackage/CompleteBuild.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 74375d5c..be4011eb 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -148,14 +148,15 @@ renderLTSVer lts = fpFromText $ concat , ".yaml" ] --- | Just print a message saying "still alive" every second, to appease Travis. +-- | Just print a message saying "still alive" every minute, to appease Travis. stillAlive :: IO () -> IO () stillAlive inner = - withAsync printer $ const inner + withAsync (printer 1) $ const inner where - printer = forever $ do - threadDelay 1000000 - putStrLn "Still alive" + printer i = forever $ do + threadDelay 60000000 + putStrLn $ "Still alive: " ++ tshow i + printer $! i + 1 -- | Generate and check a new build plan, but do not execute it. -- From a8a92976597f64ff5d412a2b375bf0b3598ef24c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 17:42:57 +0200 Subject: [PATCH 052/233] Test and docs failures mvoidex/hdocs#3 leventov/yarr#5 --- build-constraints.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1b45418d..53ae3fc6 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -895,6 +895,9 @@ expected-test-failures: # https://github.com/jswebtools/language-ecmascript/issues/60 - language-ecmascript + # https://github.com/mvoidex/hdocs/issues/3 + - hdocs + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 @@ -903,6 +906,9 @@ expected-haddock-failures: # https://github.com/ekmett/gl/issues/4 - gl + # https://github.com/leventov/yarr/issues/5 + - yarr + # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From acf70ee25d0840a988a45e875b7aac53e439f2f5 Mon Sep 17 00:00:00 2001 From: Lambdageek Date: Mon, 5 Jan 2015 11:07:32 -0500 Subject: [PATCH 053/233] Add "unbound-generics" to Stackage. --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 53ae3fc6..13b55a4c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -643,6 +643,9 @@ packages: - hdocs - hsdev + "Aleksey Kliger aleksey@lambdageek.org @lambdageek": + - unbound-generics + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 21507586d68092370300ad72634f5872d73f6eec Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 5 Jan 2015 21:50:45 +0200 Subject: [PATCH 054/233] Version bump --- ChangeLog.md | 4 ++++ stackage.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index bc6d7be2..10080e33 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +## 0.4.0.1 + +* Print "Still Alive" while checking, to avoid Travis timeouts. + ## 0.4.0 * Command line uses optparse-applicative with additional options diff --git a/stackage.cabal b/stackage.cabal index 7c4831c9..353de1e6 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.4.0 +version: 0.4.0.1 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 20a6d58cb1c8b8475a02da9beb52a4cab20d4514 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 6 Jan 2015 07:18:15 +0200 Subject: [PATCH 055/233] Upper bound for #401 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 13b55a4c..fbafff3e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -669,6 +669,9 @@ packages: # https://github.com/fpco/stackage/issues/398 - monoid-subclasses < 0.4 + # https://github.com/fpco/stackage/issues/401 + - happstack-server < 7.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From db2ba1203b1957c6ed43e9498939688191998348 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 6 Jan 2015 07:18:26 +0200 Subject: [PATCH 056/233] Upper bound for #402 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index fbafff3e..28f1d2c5 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -672,6 +672,9 @@ packages: # https://github.com/fpco/stackage/issues/401 - happstack-server < 7.4 + # https://github.com/fpco/stackage/issues/402 + - vector-space < 0.9 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 27ac5db4553dee60513d880e039e1e26d7fdbbd8 Mon Sep 17 00:00:00 2001 From: Adam Bergmark Date: Tue, 6 Jan 2015 08:42:10 +0100 Subject: [PATCH 057/233] Add me as maintainer for fclabels --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 28f1d2c5..f473cc53 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -378,6 +378,7 @@ packages: - fay-jquery - fay-text - fay-uri + - fclabels - snaplet-fay "Rodrigo Setti ": From e77403edc4cb3496025aea377d9b887a9f681350 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 6 Jan 2015 10:52:45 +0200 Subject: [PATCH 058/233] upload-nightly --- ChangeLog.md | 5 ++- Stackage/CompleteBuild.hs | 85 +++++++++++++++++++++++++-------------- app/stackage.hs | 10 +++++ stackage.cabal | 2 +- 4 files changed, 68 insertions(+), 34 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 10080e33..3dd9afc9 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,7 @@ -## 0.4.0.1 +## 0.4.1 -* Print "Still Alive" while checking, to avoid Travis timeouts. +* Print "Still Alive" while checking, to avoid Travis timeouts +* Include `stackage upload-nightly` command ## 0.4.0 diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index be4011eb..acdf682b 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -7,6 +7,7 @@ module Stackage.CompleteBuild , BuildFlags (..) , completeBuild , justCheck + , justUploadNightly ) where import Control.Concurrent (threadDelay) @@ -53,28 +54,38 @@ data Settings = Settings , postBuild :: IO () } +nightlyPlanFile :: Text -- ^ day + -> FilePath +nightlyPlanFile day = fpFromText ("nightly-" ++ day) <.> "yaml" + +nightlySettings :: Text -- ^ day + -> BuildPlan + -> Settings +nightlySettings day plan' = Settings + { planFile = nightlyPlanFile day + , buildDir = fpFromText $ "builds/stackage-nightly-" ++ day + , logDir = fpFromText $ "logs/stackage-nightly-" ++ day + , title = \ghcVer -> concat + [ "Stackage Nightly " + , day + , ", GHC " + , ghcVer + ] + , slug = slug' + , setArgs = \ghcVer ub -> ub { ubNightly = Just ghcVer } + , plan = plan' + , postBuild = return () + } + where + slug' = "nightly-" ++ day + getSettings :: Manager -> BuildType -> IO Settings getSettings man Nightly = do day <- tshow . utctDay <$> getCurrentTime - let slug' = "nightly-" ++ day bc <- defaultBuildConstraints man pkgs <- getLatestAllowedPlans bc plan' <- newBuildPlan pkgs bc - return Settings - { planFile = fpFromText ("nightly-" ++ day) <.> "yaml" - , buildDir = fpFromText $ "builds/stackage-nightly-" ++ day - , logDir = fpFromText $ "logs/stackage-nightly-" ++ day - , title = \ghcVer -> concat - [ "Stackage Nightly " - , day - , ", GHC " - , ghcVer - ] - , slug = slug' - , setArgs = \ghcVer ub -> ub { ubNightly = Just ghcVer } - , plan = plan' - , postBuild = return () - } + return $ nightlySettings day plan' getSettings man (LTS bumpType) = do Option mlts <- fmap (fmap getMax) $ runResourceT $ sourceDirectory "." @@ -178,6 +189,19 @@ justCheck = stillAlive $ withManager tlsManagerSettings $ \man -> do putStrLn "Plan seems valid!" +getPerformBuild :: BuildFlags -> Settings -> PerformBuild +getPerformBuild buildFlags Settings {..} = PerformBuild + { pbPlan = plan + , pbInstallDest = buildDir + , pbLogDir = logDir + , pbLog = hPut stdout + , pbJobs = 8 + , pbGlobalInstall = False + , pbEnableTests = bfEnableTests buildFlags + , pbEnableLibProfiling = bfEnableLibProfile buildFlags + , pbVerbose = bfVerbose buildFlags + } + -- | Make a complete plan, build, test and upload bundle, docs and -- distro. completeBuild :: BuildType -> BuildFlags -> IO () @@ -194,26 +218,23 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do checkBuildPlan plan putStrLn "Performing build" - let pb = PerformBuild - { pbPlan = plan - , pbInstallDest = buildDir - , pbLogDir = logDir - , pbLog = hPut stdout - , pbJobs = 8 - , pbGlobalInstall = False - , pbEnableTests = bfEnableTests buildFlags - , pbEnableLibProfiling = bfEnableLibProfile buildFlags - , pbVerbose = bfVerbose buildFlags - } - performBuild pb >>= mapM_ putStrLn + performBuild (getPerformBuild buildFlags settings) >>= mapM_ putStrLn when (bfDoUpload buildFlags) $ - finallyUpload settings man pb + finallyUpload settings man + +justUploadNightly + :: Text -- ^ nightly date + -> IO () +justUploadNightly day = do + plan <- decodeFileEither (fpToString $ nightlyPlanFile day) + >>= either throwM return + withManager tlsManagerSettings $ finallyUpload $ nightlySettings day plan -- | The final part of the complete build process: uploading a bundle, -- docs and a distro to hackage. -finallyUpload :: Settings -> Manager -> PerformBuild -> IO () -finallyUpload Settings{..} man pb = do +finallyUpload :: Settings -> Manager -> IO () +finallyUpload settings@Settings{..} man = do putStrLn "Uploading bundle to Stackage Server" token <- readFile "/auth-token" now <- epochTime @@ -253,3 +274,5 @@ finallyUpload Settings{..} man pb = do , udmDocDir = pbDocDir pb , udmPlan = plan } man >>= print + where + pb = getPerformBuild (error "finallyUpload.buildFlags") settings diff --git a/app/stackage.hs b/app/stackage.hs index 08efe846..f9d31f7c 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -4,6 +4,7 @@ module Main where import Control.Monad import Data.Monoid +import Data.String (fromString) import Data.Version import Options.Applicative import Paths_stackage (version) @@ -45,6 +46,11 @@ main = (fmap (LTS Minor, ) buildFlags) "lts-minor" "Build, test and upload the LTS (minor) snapshot" + , cmnd + justUploadNightly + nightlyUploadFlags + "upload-nightly" + "Upload an already-built nightly snapshot" , cmnd (const justCheck) (pure ()) @@ -73,3 +79,7 @@ main = switch (long "verbose" <> short 'v' <> help "Output verbose detail about the build steps") + + nightlyUploadFlags = fromString <$> strArgument + (metavar "DATE" <> + help "Date, in YYYY-MM-DD format") diff --git a/stackage.cabal b/stackage.cabal index 353de1e6..8401a6ad 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.4.0.1 +version: 0.4.1 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 44cba232b7813e6eb08c9a5acb449dfa9001af56 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 6 Jan 2015 11:33:44 +0200 Subject: [PATCH 059/233] Try out a Docker build --- .dockerignore | 7 +++++++ Dockerfile | 27 +++++++++++++++++++++++++++ debian-bootstrap.sh | 8 ++++---- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..e09d9880 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +dist +builds +logs +.cabal-sandbox +cabal.sandbox.config +tarballs +*.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5a7aa4d3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:12.04 + +ENV HOME /home/stackage +ENV LANG en_US.UTF-8 + +RUN mkdir /home/stackage -p +RUN locale-gen en_US.UTF-8 + +RUN DEBIAN_FRONTEND=noninteractive apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common python-software-properties +RUN DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:hvr/ghc -y + +ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh +RUN DEBIAN_FRONTEND=noninteractive bash /tmp/debian-bootstrap.sh +RUN rm /tmp/debian-bootstrap.sh + +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install-1.20 ghc-7.8.4 + +ENV PATH /opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +RUN cabal update +ADD . /tmp/stackage +RUN cd /tmp/stackage && cabal install +RUN cp $HOME/.cabal/bin/stackage /usr/local/bin +RUN rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage + +RUN cd /home/stackage && cabal update && stackage nightly diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 50177b28..2e423c25 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -10,10 +10,10 @@ # instructions, see: # http://www.stackage.org/install -sudo add-apt-repository -y ppa:chris-lea/zeromq -sudo add-apt-repository -y ppa:floe/libtisch -sudo apt-get update -sudo apt-get install -y \ +add-apt-repository -y ppa:chris-lea/zeromq +add-apt-repository -y ppa:floe/libtisch +apt-get update +apt-get install -y \ build-essential \ libncurses-dev \ git \ From 32dbaa45997747f6e72d8aa7e80d1f32ca526ec5 Mon Sep 17 00:00:00 2001 From: Alois Cochard Date: Mon, 5 Jan 2015 18:11:29 +0100 Subject: [PATCH 060/233] Adding `codex` and `machines-*` packages. --- build-constraints.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 13b55a4c..4861aba4 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -646,6 +646,11 @@ packages: "Aleksey Kliger aleksey@lambdageek.org @lambdageek": - unbound-generics + "Alois Cochard alois.cochard@gmail.com @aloiscochard": + - machines-directory + - machines-io + - machines-process + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 636846ba3163186e54a89fa71c5faf53828af29c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 6 Jan 2015 15:43:14 +0200 Subject: [PATCH 061/233] Docker: check, do not build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5a7aa4d3..af097edc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,4 +24,4 @@ RUN cd /tmp/stackage && cabal install RUN cp $HOME/.cabal/bin/stackage /usr/local/bin RUN rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage -RUN cd /home/stackage && cabal update && stackage nightly +RUN cd /home/stackage && cabal update && stackage check From d08d1b624852937dfe1a74a860d3e47124352444 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Wed, 7 Jan 2015 02:45:50 +0100 Subject: [PATCH 062/233] Check for cycles when checking a build plan #375 --- Stackage/CheckBuildPlan.hs | 63 +++++++++++++++++++++++++++++----- test/Stackage/BuildPlanSpec.hs | 10 +++++- 2 files changed, 63 insertions(+), 10 deletions(-) diff --git a/Stackage/CheckBuildPlan.hs b/Stackage/CheckBuildPlan.hs index ea656a9c..74bf3b83 100644 --- a/Stackage/CheckBuildPlan.hs +++ b/Stackage/CheckBuildPlan.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} @@ -11,30 +12,34 @@ module Stackage.CheckBuildPlan ) where import Control.Monad.Writer.Strict (Writer, execWriter, tell) -import qualified Data.Text as T +import qualified Data.Map.Strict as M +import qualified Data.Text as T import Stackage.BuildConstraints import Stackage.BuildPlan import Stackage.PackageDescription import Stackage.Prelude --- FIXME check cycles in dependencies, only looking at libraries and --- executables - -- | Check the build plan for missing deps, wrong versions, etc. -checkBuildPlan :: MonadThrow m => BuildPlan -> m () +checkBuildPlan :: (MonadThrow m) => BuildPlan -> m () checkBuildPlan BuildPlan {..} | null errs' = return () | otherwise = throwM errs where - allPackages = siCorePackages bpSystemInfo ++ map ppVersion bpPackages + allPackages = map (,mempty) (siCorePackages bpSystemInfo) ++ + map (ppVersion &&& M.keys . M.filter libAndExe . sdPackages . ppDesc) bpPackages errs@(BadBuildPlan errs') = execWriter $ mapM_ (checkDeps allPackages) $ mapToList bpPackages + -- Only looking at libraries and executables, benchmarks and tests + -- are allowed to create cycles (e.g. test-framework depends on + -- text, which uses test-framework in its test-suite). + libAndExe (DepInfo cs _) = any (flip elem [CompLibrary,CompExecutable]) cs -- | For a given package name and plan, check that its dependencies are: -- -- 1. Existent (existing in the provided package map) -- 2. Within version range -checkDeps :: Map PackageName Version +-- 3. Check for dependency cycles. +checkDeps :: Map PackageName (Version,[PackageName]) -> (PackageName, PackagePlan) -> Writer BadBuildPlan () checkDeps allPackages (user, pb) = @@ -43,8 +48,16 @@ checkDeps allPackages (user, pb) = go (dep, diRange -> range) = case lookup dep allPackages of Nothing -> tell $ BadBuildPlan $ singletonMap (dep, Nothing) errMap - Just version - | version `withinRange` range -> return () + Just (version,deps) + | version `withinRange` range -> + occursCheck allPackages + (\d v -> + tell $ BadBuildPlan $ singletonMap + (d,v) + errMap) + dep + deps + [] | otherwise -> tell $ BadBuildPlan $ singletonMap (dep, Just version) errMap @@ -57,6 +70,38 @@ checkDeps allPackages (user, pb) = , puGithubPings = ppGithubPings pb } +-- | Check whether the package(s) occurs within its own dependency +-- tree. +occursCheck + :: Monad m + => Map PackageName (Version,[PackageName]) + -- ^ All packages. + -> (PackageName -> Maybe Version -> m ()) + -- ^ Report an erroneous package. + -> PackageName + -- ^ Starting package to check for cycles in. + -> [PackageName] + -- ^ Dependencies of the package. + -> [PackageName] + -- ^ Previously seen packages up the dependency tree. + -> m () +occursCheck allPackages reportError = + go + where + go pkg deps seen = + case find (flip elem seen) deps of + Just cyclic -> + reportError cyclic $ + fmap fst (lookup cyclic allPackages) + Nothing -> + forM_ deps $ + \pkg' -> + case lookup pkg' allPackages of + Just (_v,deps') + | pkg' /= pkg -> go pkg' deps' seen' + _ -> return () + where seen' = pkg : seen + data PkgUser = PkgUser { puName :: PackageName , puVersion :: Version diff --git a/test/Stackage/BuildPlanSpec.hs b/test/Stackage/BuildPlanSpec.hs index 99679801..b929d689 100644 --- a/test/Stackage/BuildPlanSpec.hs +++ b/test/Stackage/BuildPlanSpec.hs @@ -29,7 +29,15 @@ spec = do it "nonexistent package fails to check" $ badBuildPlan $ makePackageSet [("foo", [0, 0, 0], [("nonexistent", thisV [0, 0, 0])]) ,("bar", [0, 0, 0], [])] - it "default package set checks ok" $ check defaultBuildConstraints getLatestAllowedPlans + it "mutual cycles fail to check" $ badBuildPlan $ makePackageSet + [("foo", [0, 0, 0], [("bar", thisV [0, 0, 0])]) + ,("bar", [0, 0, 0], [("foo", thisV [0, 0, 0])])] + it "nested cycles fail to check" $ badBuildPlan $ makePackageSet + [("foo", [0, 0, 0], [("bar", thisV [0, 0, 0])]) + ,("bar", [0, 0, 0], [("mu", thisV [0, 0, 0])]) + ,("mu", [0, 0, 0], [("foo", thisV [0, 0, 0])])] + it "default package set checks ok" $ + check defaultBuildConstraints getLatestAllowedPlans -- | Checking should be considered a bad build plan. badBuildPlan :: (BuildConstraints -> IO (Map PackageName PackagePlan)) From fb5e40a605012c804f1361911387675b449a8078 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 7 Jan 2015 08:35:47 +0200 Subject: [PATCH 063/233] Upper bound for #370 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3c2063e6..4be259e7 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -663,6 +663,7 @@ packages: # https://github.com/fpco/stackage/issues/370 - monad-control < 1 - lifted-async < 0.3 + - scotty < 0.9.1 # https://github.com/fpco/stackage/issues/389 - lens < 4.7 From 548578c16b0833232a2a3850fabf89aae22d64b4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 7 Jan 2015 17:10:49 +0200 Subject: [PATCH 064/233] skip-check option to nightly (good for 7.10 builds) --- ChangeLog.md | 3 ++- Stackage/CompleteBuild.hs | 9 +++++++-- Stackage/PerformBuild.hs | 3 +++ app/stackage.hs | 5 ++++- stackage.cabal | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 3dd9afc9..416ca03d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,7 +1,8 @@ -## 0.4.1 +## 0.5.0 * Print "Still Alive" while checking, to avoid Travis timeouts * Include `stackage upload-nightly` command +* Optional plan checking ## 0.4.0 diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index acdf682b..7a96ce74 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -35,6 +35,7 @@ data BuildFlags = BuildFlags , bfDoUpload :: !Bool , bfEnableLibProfile :: !Bool , bfVerbose :: !Bool + , bfSkipCheck :: !Bool } deriving (Show) data BuildType = Nightly | LTS BumpType @@ -200,6 +201,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild , pbEnableTests = bfEnableTests buildFlags , pbEnableLibProfiling = bfEnableLibProfile buildFlags , pbVerbose = bfVerbose buildFlags + , pbAllowNewer = bfSkipCheck buildFlags } -- | Make a complete plan, build, test and upload bundle, docs and @@ -214,8 +216,11 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do putStrLn $ "Writing build plan to: " ++ fpToText planFile encodeFile (fpToString planFile) plan - putStrLn "Checking build plan" - checkBuildPlan plan + if bfSkipCheck buildFlags + then putStrLn "Skipping build plan check" + else do + putStrLn "Checking build plan" + checkBuildPlan plan putStrLn "Performing build" performBuild (getPerformBuild buildFlags settings) >>= mapM_ putStrLn diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 7cdb3efd..55601341 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -64,6 +64,8 @@ data PerformBuild = PerformBuild , pbEnableTests :: Bool , pbEnableLibProfiling :: Bool , pbVerbose :: Bool + , pbAllowNewer :: Bool + -- ^ Pass --allow-newer to cabal configure } data PackageInfo = PackageInfo @@ -293,6 +295,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = withBinaryFile (fpToString fp) WriteMode inner' configArgs = ($ []) $ execWriter $ do + when pbAllowNewer $ tell' "--allow-newer" tell' "--package-db=clear" tell' "--package-db=global" forM_ (pbDatabase pb) $ \db -> tell' $ "--package-db=" ++ fpToText db diff --git a/app/stackage.hs b/app/stackage.hs index f9d31f7c..1f61496f 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -78,7 +78,10 @@ main = help "Enable profiling when building") <*> switch (long "verbose" <> short 'v' <> - help "Output verbose detail about the build steps") + help "Output verbose detail about the build steps") <*> + switch + (long "skip-check" <> + help "Skip the check phase, and pass --allow-newer to cabal configure") nightlyUploadFlags = fromString <$> strArgument (metavar "DATE" <> diff --git a/stackage.cabal b/stackage.cabal index 8401a6ad..03a55f6e 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.4.1 +version: 0.5.0 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 7f8fe885cad525da7ab82b190e76705a6287d6b0 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 8 Jan 2015 10:17:07 +0200 Subject: [PATCH 065/233] Add some auth packages --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 4be259e7..3b0a1d0e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -27,7 +27,10 @@ packages: - warp-tls - yackage - yesod + - yesod-auth + - yesod-auth-oauth - yesod-auth-deskcom + - authenticate-oauth - yesod-bin - yesod-eventsource - yesod-fay From 4d57914e7cb865f01830bc95c9e8c40fc169e00a Mon Sep 17 00:00:00 2001 From: Renzo Carbonara Date: Thu, 8 Jan 2015 11:56:12 -0300 Subject: [PATCH 066/233] Add packages: network-simple, pipes-aeson, pipes-attoparsec, pipes-binary, pipes-network --- build-constraints.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3b0a1d0e..f14b3a00 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -655,6 +655,13 @@ packages: - machines-io - machines-process + "Renzo Carbonara renzocarbonara@gmail.com @k0001": + - network-simple + - pipes-aeson + - pipes-attoparsec + - pipes-binary + - pipes-network + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 6b953ccc42e0136e73437b7cc3505e6698359e2c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 8 Jan 2015 20:23:12 +0200 Subject: [PATCH 067/233] Add hpc-coveralls Pinging @manny-fp. This adds in retry as well, with tests disabled. --- build-constraints.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3b0a1d0e..557749e2 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -49,6 +49,7 @@ packages: - binary-conduit - lzma-conduit - mutable-containers + - hpc-coveralls "FP Complete michael@fpcomplete.com @snoyberg": - alex @@ -774,6 +775,9 @@ skipped-tests: # https://github.com/fpco/stackage/pull/380#issuecomment-68060871 - Rasterific + # https://github.com/Soostone/retry/issues/18 + - retry + # Tests which we should build and run, but which are expected to fail. We # should not fail a build based on a test failure for one of these packages. expected-test-failures: From 4e156eb432d558c99b5aaa5484eb3910c2f0f5d1 Mon Sep 17 00:00:00 2001 From: Andraz Bajt Date: Fri, 9 Jan 2015 08:45:49 +0100 Subject: [PATCH 068/233] add snowflake, koofr-client and effect-handlers --- build-constraints.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 557749e2..71cbf946 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -655,6 +655,11 @@ packages: - machines-directory - machines-io - machines-process + + "Andraz Bajt andraz@bajt.me @edofic": + - effect-handlers + - koofr-client + - snowflake "Stackage upper bounds": From e53a3d2ad2226d34f09c4b2040d29ce611ee34f2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 9 Jan 2015 10:08:50 +0200 Subject: [PATCH 069/233] More monad-control issues --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 557749e2..072441cb 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -668,6 +668,7 @@ packages: - monad-control < 1 - lifted-async < 0.3 - scotty < 0.9.1 + - hoauth2 < 0.4.4 # https://github.com/fpco/stackage/issues/389 - lens < 4.7 From 6f158c0a61c7231edd5be62f681bd5aaabb24ffb Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 9 Jan 2015 10:10:55 +0200 Subject: [PATCH 070/233] Upper bound for #407 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 072441cb..17b344b0 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -687,6 +687,9 @@ packages: # https://github.com/fpco/stackage/issues/402 - vector-space < 0.9 + # https://github.com/fpco/stackage/issues/407 + - HStringTemplate < 0.8 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 6b48a823a1a43938c4c11568a4663c4bb984315f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 9 Jan 2015 11:07:39 +0200 Subject: [PATCH 071/233] Expected test failure guillaume-nargeot/hpc-coveralls#34 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 531f28cf..5d146ee9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -930,6 +930,9 @@ expected-test-failures: # https://github.com/mvoidex/hdocs/issues/3 - hdocs + # https://github.com/guillaume-nargeot/hpc-coveralls/issues/34 + - hpc-coveralls + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 3b03ee972c1a9b6e3283cbaba5aef6b7d3aaa9be Mon Sep 17 00:00:00 2001 From: Guillaume Nargeot Date: Sat, 10 Jan 2015 21:53:44 +0900 Subject: [PATCH 072/233] Fixed guillaume-nargeot/hpc-coveralls#34 (Added test modules to package) --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 5d146ee9..531f28cf 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -930,9 +930,6 @@ expected-test-failures: # https://github.com/mvoidex/hdocs/issues/3 - hdocs - # https://github.com/guillaume-nargeot/hpc-coveralls/issues/34 - - hpc-coveralls - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 78ab7b0e7645a94017c79c5a372a08e7d473495a Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 11 Jan 2015 11:31:13 +0800 Subject: [PATCH 073/233] Remove setenv from expected-test-failures --- build-constraints.yaml | 5 ++--- cabal.config | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 531f28cf..196e365e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -793,10 +793,9 @@ expected-test-failures: # Requires an old version of WAI and Warp for tests - HTTP - # text and setenv have recursive dependencies in their tests, which - # cabal can't (yet) handle + # text has recursive dependencies in its tests, which cabal can't (yet) + # handle - text - - setenv # https://github.com/bos/statistics/issues/42 - statistics diff --git a/cabal.config b/cabal.config index 25f3661e..cc656768 100644 --- a/cabal.config +++ b/cabal.config @@ -647,7 +647,7 @@ constraints: abstract-deque ==0.3, semigroups ==0.16.0.1, sendfile ==0.7.9, seqloc ==0.6, - setenv ==0.1.1.1, + setenv ==0.1.1.2, SHA ==1.6.4.1, shake ==0.14.2, shake-language-c ==0.6.3, From c0bce54c6fe83ed2f0b0040e7a6ea4cca246cdf6 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 09:48:15 +0200 Subject: [PATCH 074/233] Upper bound for #410 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 196e365e..a57579c8 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -695,6 +695,9 @@ packages: # https://github.com/fpco/stackage/issues/407 - HStringTemplate < 0.8 + # https://github.com/fpco/stackage/issues/410 + - elm-package < 0.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 085bd7f8cc3d00b3715ed6243c1edf5fe483dff1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 09:48:26 +0200 Subject: [PATCH 075/233] Flag for text --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index a57579c8..8897569c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -741,6 +741,9 @@ package-flags: pandoc: https: true + text: + integer-simple: false + # By skipping a test suite, we do not pull in the build dependencies skipped-tests: - ReadArgs # old version of hspec From a143fc438d88b45578d50501027cceacd1ee529a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 09:50:00 +0200 Subject: [PATCH 076/233] Allow text test suite to run --- build-constraints.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8897569c..54485a00 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -799,10 +799,6 @@ expected-test-failures: # Requires an old version of WAI and Warp for tests - HTTP - # text has recursive dependencies in its tests, which cabal can't (yet) - # handle - - text - # https://github.com/bos/statistics/issues/42 - statistics From fd56370e3ae7cce0ab26248dd24cf0e610ae5907 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 10:08:02 +0200 Subject: [PATCH 077/233] STACKAGE_AUTH_TOKEN environment variable --- ChangeLog.md | 5 +++++ Stackage/BuildConstraints.hs | 37 +++++++++++++++++++++++++++--------- Stackage/CompleteBuild.hs | 15 +++++++++++---- Stackage/PerformBuild.hs | 10 +++++++++- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 416ca03d..a41aa3b2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +## 0.5.1 + +* `loadBuildConstraints` +* More command line options + ## 0.5.0 * Print "Still Alive" while checking, to avoid Travis timeouts diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index 674ac395..e7aae355 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -11,6 +11,8 @@ module Stackage.BuildConstraints , getSystemInfo , defaultBuildConstraints , toBC + , BuildConstraintsSource (..) + , loadBuildConstraints ) where import Control.Monad.Writer.Strict (execWriter, tell) @@ -22,7 +24,7 @@ import Distribution.System (Arch, OS) import qualified Distribution.System import Distribution.Version (anyVersion) import Filesystem (isFile) -import Network.HTTP.Client (Manager, httpLbs, responseBody) +import Network.HTTP.Client (Manager, httpLbs, responseBody, Request) import Stackage.CorePackages import Stackage.Prelude @@ -126,15 +128,32 @@ instance FromJSON PackageConstraints where -- Checks the current directory for a build-constraints.yaml file and uses it -- if present. If not, downloads from Github. defaultBuildConstraints :: Manager -> IO BuildConstraints -defaultBuildConstraints man = do - e <- isFile fp - if e - then decodeFileEither (fpToString fp) >>= either throwIO toBC - else httpLbs req man >>= - either throwIO toBC . decodeEither' . toStrict . responseBody +defaultBuildConstraints = loadBuildConstraints BCSDefault + +data BuildConstraintsSource + = BCSDefault + | BCSFile FilePath + | BCSWeb Request + deriving (Show) + +loadBuildConstraints :: BuildConstraintsSource -> Manager -> IO BuildConstraints +loadBuildConstraints bcs man = do + case bcs of + BCSDefault -> do + e <- isFile fp0 + if e + then loadFile fp0 + else loadReq req0 + BCSFile fp -> loadFile fp + BCSWeb req -> loadReq req where - fp = "build-constraints.yaml" - req = "https://raw.githubusercontent.com/fpco/stackage/master/build-constraints.yaml" + fp0 = "build-constraints.yaml" + req0 = "https://raw.githubusercontent.com/fpco/stackage/master/build-constraints.yaml" + + loadFile fp = decodeFileEither (fpToString fp) >>= either throwIO toBC + loadReq req = httpLbs req man >>= + either throwIO toBC . decodeEither' . toStrict . responseBody + getSystemInfo :: IO SystemInfo getSystemInfo = do diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 7a96ce74..5960d960 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -27,6 +27,7 @@ import Stackage.Prelude import Stackage.ServerBundle import Stackage.UpdateBuildPlan import Stackage.Upload +import System.Environment (lookupEnv) import System.IO (BufferMode (LineBuffering), hSetBuffering) -- | Flags passed in from the command line. @@ -241,12 +242,18 @@ justUploadNightly day = do finallyUpload :: Settings -> Manager -> IO () finallyUpload settings@Settings{..} man = do putStrLn "Uploading bundle to Stackage Server" - token <- readFile "/auth-token" + + mtoken <- lookupEnv "STACKAGE_AUTH_TOKEN" + token <- + case mtoken of + Nothing -> decodeUtf8 <$> readFile "/auth-token" + Just token -> return $ pack token + now <- epochTime let ghcVer = display $ siGhcVersion $ bpSystemInfo plan (ident, mloc) <- flip uploadBundle man $ setArgs ghcVer def { ubContents = serverBundle now (title ghcVer) slug plan - , ubAuthToken = decodeUtf8 token + , ubAuthToken = token } putStrLn $ "New ident: " ++ unSnapshotIdent ident forM_ mloc $ \loc -> @@ -257,7 +264,7 @@ finallyUpload settings@Settings{..} man = do putStrLn "Uploading docs to Stackage Server" res1 <- uploadDocs UploadDocs { udServer = def - , udAuthToken = decodeUtf8 token + , udAuthToken = token , udDocs = pbDocDir pb , udSnapshot = ident } man @@ -274,7 +281,7 @@ finallyUpload settings@Settings{..} man = do putStrLn "Uploading doc map" uploadDocMap UploadDocMap { udmServer = def - , udmAuthToken = decodeUtf8 token + , udmAuthToken = token , udmSnapshot = ident , udmDocDir = pbDocDir pb , udmPlan = plan diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 55601341..58821125 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -197,7 +197,7 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do id (\db -> (("HASKELL_PACKAGE_SANDBOX", fpToString db):)) (pbDatabase pb) - (map fixEnv env) + (filter allowedEnv $ map fixEnv env) , sbHaddockFiles = haddockFiles } @@ -215,6 +215,8 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do | toUpper p == "PATH" = (p, fpToString (pbBinDir pb) ++ pathSep : x) | otherwise = (p, x) + allowedEnv (k, _) = k `notMember` bannedEnvs + -- | Separate for the PATH environment variable pathSep :: Char #ifdef mingw32_HOST_OS @@ -223,6 +225,12 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do pathSep = ':' #endif +-- | Environment variables we don't allow to be passed on to child processes. +bannedEnvs :: Set String +bannedEnvs = setFromList + [ "STACKAGE_AUTH_TOKEN" + ] + data SingleBuild = SingleBuild { sbSem :: TSem , sbErrsVar :: TVar (Map PackageName BuildFailure) From 2defc5b2a538666a44917594da8bc5c95967465f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 10:17:49 +0200 Subject: [PATCH 078/233] Experimental Docker instructions --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 013e3209..dde0c3be 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,28 @@ build by running: cabal install stackage stackage nightly +### Docker + +Note: This method is currently considered experimental. + +If you'd like to check a build plan, or perform an entire build, without +specially configuring your system, Docker may be a good approach. To check if +some modifications to `build-constraints.yaml` are valid, try the following: + +1. Create a local clone of the `stackage` repo +2. Make modifications to your local `build-constraints.yaml` +3. Inside the `stackage` working directory, run the following: + + ``` + $ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage check' + ``` + +Similarly, if you'd like to perform an entire build, you can replace the last step with: + +``` +$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage build --skip-upload' +``` + ## Processing The following describes at a high level the series of steps for processing From 7a99d26a29581ef813a90b40c03a97051923b836 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 10:24:10 +0200 Subject: [PATCH 079/233] Remove expected test failure --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 54485a00..18c59c09 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -928,9 +928,6 @@ expected-test-failures: # https://github.com/jswebtools/language-ecmascript/issues/60 - language-ecmascript - # https://github.com/mvoidex/hdocs/issues/3 - - hdocs - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From c6bfb8224f0010791239a765a21f7c75c86df600 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 12:34:08 +0200 Subject: [PATCH 080/233] Add missing file to tarball --- stackage.cabal | 1 + 1 file changed, 1 insertion(+) diff --git a/stackage.cabal b/stackage.cabal index 03a55f6e..cdf4769a 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -12,6 +12,7 @@ build-type: Simple cabal-version: >=1.10 extra-source-files: README.md ChangeLog.md + test/test-build-constraints.yaml library default-language: Haskell2010 From a48748057a2cd593eed33e41f4eded8d88b3c6d9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 12:34:36 +0200 Subject: [PATCH 081/233] Version bump --- build-constraints.yaml | 2 +- stackage.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 18c59c09..19a80049 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1,7 +1,7 @@ # Constraints for brand new builds packages: "Michael Snoyman michael@snoyman.com @snoyberg": - - bzlib-conduit + - bzlib-conduit > 1000000 - cabal-install < 1.19 # GHC 7.10 bumpd to 1.22 - cabal-src - case-insensitive diff --git a/stackage.cabal b/stackage.cabal index cdf4769a..fee22c08 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.5.0 +version: 0.5.1 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 30da8ebb0811ab4bf2b2ffa494d736d439493e7a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 12:35:13 +0200 Subject: [PATCH 082/233] Remove accidental debugging info --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 19a80049..18c59c09 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1,7 +1,7 @@ # Constraints for brand new builds packages: "Michael Snoyman michael@snoyman.com @snoyberg": - - bzlib-conduit > 1000000 + - bzlib-conduit - cabal-install < 1.19 # GHC 7.10 bumpd to 1.22 - cabal-src - case-insensitive From 0ad61751760014415f97864badbf50e30eccdfb4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 13:01:11 +0200 Subject: [PATCH 083/233] Fix Docker command to use stackage nightly --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dde0c3be..82a9802d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ some modifications to `build-constraints.yaml` are valid, try the following: Similarly, if you'd like to perform an entire build, you can replace the last step with: ``` -$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage build --skip-upload' +$ docker run -it --rm -v $(pwd):/stackage -w /stackage snoyberg/stackage /bin/bash -c 'cabal update && stackage nightly --skip-upload' ``` ## Processing From f80d0bc8e10c24e5fa2f8f825685bfdf0d0692d5 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 13:16:48 +0200 Subject: [PATCH 084/233] Docker: install hscolour --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index af097edc..2a90db9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,8 @@ ENV PATH /opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/local/sbin:/usr/local/bin:/ RUN cabal update ADD . /tmp/stackage -RUN cd /tmp/stackage && cabal install -RUN cp $HOME/.cabal/bin/stackage /usr/local/bin +RUN cd /tmp/stackage && cabal install . hscolour +RUN cp $HOME/.cabal/bin/* /usr/local/bin RUN rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage RUN cd /home/stackage && cabal update && stackage check From 0a9ef9bbe3370d427c65b0f13cfb60efe01b56d0 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 16:49:14 +0200 Subject: [PATCH 085/233] Skip ChasingBottoms 1.3.0.10 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 18c59c09..6742f24b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -698,6 +698,9 @@ packages: # https://github.com/fpco/stackage/issues/410 - elm-package < 0.4 + # https://github.com/fpco/lts-haskell/issues/5 + - ChasingBottoms "< 1.3.0.10 || > 1.3.0.10" + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From dd4026fb4537f33bbe16a76e4d584350b8c0d468 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 11 Jan 2015 16:52:33 +0200 Subject: [PATCH 086/233] Fix previous version constraint --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6742f24b..09251564 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -699,7 +699,7 @@ packages: - elm-package < 0.4 # https://github.com/fpco/lts-haskell/issues/5 - - ChasingBottoms "< 1.3.0.10 || > 1.3.0.10" + - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 # Package flags are applied to individual packages, and override the values of # global-flags From 948f796190b0822ae1669cceb1fc56947b3e379f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 12 Jan 2015 12:50:04 +0200 Subject: [PATCH 087/233] Set Joey as ping for Elm --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 09251564..b42212f2 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -992,3 +992,5 @@ github-users: - mightybyte haskell-ro: - mihaimaruseac + elm-lang: + - JoeyEremondi From a649714c359cfa40663422d690bfa4b46d503a62 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 13 Jan 2015 07:50:30 +0200 Subject: [PATCH 088/233] Expected test failure kazy-yamamoto/unix-time#29 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index b42212f2..0c71737c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -931,6 +931,9 @@ expected-test-failures: # https://github.com/jswebtools/language-ecmascript/issues/60 - language-ecmascript + # https://github.com/kazu-yamamoto/unix-time/issues/29 + - unix-time + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 28a53c135812ff0cfe5e4d77fbfe00b8591e018b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 13 Jan 2015 16:39:28 +0900 Subject: [PATCH 089/233] add cabal-rpm --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0c71737c..ab07fc02 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -661,6 +661,9 @@ packages: - koofr-client - snowflake + "Jens Petersen juhpetersen@gmail.com @juhp": + - cabal-rpm + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From cd23e9856bf5740bd2c7fd3d0b2ac21a6e8b978d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 07:57:47 +0200 Subject: [PATCH 090/233] Upper bound for #412 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index ab07fc02..c6dead3f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -704,6 +704,9 @@ packages: # https://github.com/fpco/lts-haskell/issues/5 - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 + # https://github.com/fpco/stackage/issues/412 + - process-extras < 0.3 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From b08210debd0d57de322d6be0ad9e39eb19ad2d41 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 08:18:30 +0200 Subject: [PATCH 091/233] LTSHaskell distro name haskell/hackage-server#307 --- Stackage/CompleteBuild.hs | 5 ++++- Stackage/Upload.hs | 32 +++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 5960d960..cf74eef2 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -54,6 +54,7 @@ data Settings = Settings , slug :: Text , setArgs :: Text -> UploadBundle -> UploadBundle , postBuild :: IO () + , distroName :: Text -- ^ distro name on Hackage } nightlyPlanFile :: Text -- ^ day @@ -77,6 +78,7 @@ nightlySettings day plan' = Settings , setArgs = \ghcVer ub -> ub { ubNightly = Just ghcVer } , plan = plan' , postBuild = return () + , distroName = "Stackage" } where slug' = "nightly-" ++ day @@ -137,6 +139,7 @@ getSettings man (LTS bumpType) = do git ["commit", "-m", "Added new LTS release: " ++ show new] putStrLn "Pushing to Git repository" git ["push"] + , distroName = "LTSHaskell" } data LTSVer = LTSVer !Int !Int @@ -274,7 +277,7 @@ finallyUpload settings@Settings{..} man = do case map encodeUtf8 $ words $ decodeUtf8 $ either (const "") id ecreds of [username, password] -> do putStrLn "Uploading as Hackage distro" - res2 <- uploadHackageDistro plan username password man + res2 <- uploadHackageDistroNamed distroName plan username password man putStrLn $ "Distro upload response: " ++ tshow res2 _ -> putStrLn "No creds found, skipping Hackage distro upload" diff --git a/Stackage/Upload.hs b/Stackage/Upload.hs index bb1c8246..c3e544e4 100644 --- a/Stackage/Upload.hs +++ b/Stackage/Upload.hs @@ -11,6 +11,7 @@ module Stackage.Upload , UploadDocs (..) , uploadDocs , uploadHackageDistro + , uploadHackageDistroNamed , UploadDocMap (..) , uploadDocMap ) where @@ -149,8 +150,28 @@ uploadHackageDistro :: BuildPlan -> ByteString -- ^ Hackage password -> Manager -> IO (Response LByteString) -uploadHackageDistro bp username password = - httpLbs (applyBasicAuth username password req) +uploadHackageDistro = uploadHackageDistroNamed "Stackage" + +uploadHackageDistroNamed + :: Text -- ^ distro name + -> BuildPlan + -> ByteString -- ^ Hackage username + -> ByteString -- ^ Hackage password + -> Manager + -> IO (Response LByteString) +uploadHackageDistroNamed name bp username password manager = do + req1 <- parseUrl $ concat + [ "http://hackage.haskell.org/distro/" + , unpack name + , "/packages.csv" + ] + let req2 = req1 + { requestHeaders = [("Content-Type", "text/csv")] + , requestBody = RequestBodyLBS csv + , checkStatus = \_ _ _ -> Nothing + , method = "PUT" + } + httpLbs (applyBasicAuth username password req2) manager where csv = encodeUtf8 $ builderToLazy @@ -168,13 +189,6 @@ uploadHackageDistro bp username password = (toBuilder $ display name) ++ "\"" - req = "http://hackage.haskell.org/distro/Stackage/packages.csv" - { requestHeaders = [("Content-Type", "text/csv")] - , requestBody = RequestBodyLBS csv - , checkStatus = \_ _ _ -> Nothing - , method = "PUT" - } - data UploadDocMap = UploadDocMap { udmServer :: StackageServer , udmAuthToken :: Text From 3d79cbf258a3dbb0a1959ab61713a2b5145041d7 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 08:19:25 +0200 Subject: [PATCH 092/233] Version bump --- ChangeLog.md | 4 ++++ stackage.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index a41aa3b2..87e64958 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +## 0.5.2 + +* Upload LTS to Hackage with the name LTSHaskell + ## 0.5.1 * `loadBuildConstraints` diff --git a/stackage.cabal b/stackage.cabal index fee22c08..c5e848e7 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -1,5 +1,5 @@ name: stackage -version: 0.5.1 +version: 0.5.2 synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage. description: Please see for a description and documentation. homepage: https://github.com/fpco/stackage From 1d2793a8298d5c962ae39a4be22a250cd32c2114 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 09:01:20 +0200 Subject: [PATCH 093/233] Skip DRBG-0.5.4 TomMD/DRBG#7 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c6dead3f..8a6527f7 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -707,6 +707,9 @@ packages: # https://github.com/fpco/stackage/issues/412 - process-extras < 0.3 + # https://github.com/TomMD/DRBG/issues/7 + - DRBG < 0.5.4 || > 0.5.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 68f5621ea401b0dac8df65b848747670541ab255 Mon Sep 17 00:00:00 2001 From: Alois Cochard Date: Wed, 7 Jan 2015 11:37:31 +0100 Subject: [PATCH 094/233] Adding `codex` package. --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 4be259e7..9027532f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -648,6 +648,7 @@ packages: - unbound-generics "Alois Cochard alois.cochard@gmail.com @aloiscochard": + - codex - machines-directory - machines-io - machines-process From d6998a4e8dd2ad26826ca33f4512f049b792eeda Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 11:43:36 +0200 Subject: [PATCH 095/233] Add expected test failure --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8a6527f7..83be0317 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -943,6 +943,9 @@ expected-test-failures: # https://github.com/kazu-yamamoto/unix-time/issues/29 - unix-time + # Tests can fail when the build plan fails, which happens arbitrarily. + - stackage + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 33a94d1c1ffc812c078e3b28d3ae281482181cb8 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 11:45:21 +0200 Subject: [PATCH 096/233] Skip check during test suite --- test/Stackage/BuildPlanSpec.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Stackage/BuildPlanSpec.hs b/test/Stackage/BuildPlanSpec.hs index b929d689..b87c74d2 100644 --- a/test/Stackage/BuildPlanSpec.hs +++ b/test/Stackage/BuildPlanSpec.hs @@ -36,8 +36,10 @@ spec = do [("foo", [0, 0, 0], [("bar", thisV [0, 0, 0])]) ,("bar", [0, 0, 0], [("mu", thisV [0, 0, 0])]) ,("mu", [0, 0, 0], [("foo", thisV [0, 0, 0])])] + {- Shouldn't be testing this actually it "default package set checks ok" $ check defaultBuildConstraints getLatestAllowedPlans + -} -- | Checking should be considered a bad build plan. badBuildPlan :: (BuildConstraints -> IO (Map PackageName PackagePlan)) From 0ab7bbcc764755e295ec6c4c4cd0ac91e6ff5082 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 Jan 2015 21:58:13 +0200 Subject: [PATCH 097/233] Remove upper bounds and close #412 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index df62f74d..8a2daf43 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -705,9 +705,6 @@ packages: # https://github.com/fpco/lts-haskell/issues/5 - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 - # https://github.com/fpco/stackage/issues/412 - - process-extras < 0.3 - # https://github.com/TomMD/DRBG/issues/7 - DRBG < 0.5.4 || > 0.5.4 From 455871ed38a1610c78be6ea41485c3bb10d4abc2 Mon Sep 17 00:00:00 2001 From: Alois Cochard Date: Wed, 14 Jan 2015 22:55:14 +0100 Subject: [PATCH 098/233] Add `wreq` package. --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8a2daf43..e5e9ab56 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -656,6 +656,8 @@ packages: - machines-directory - machines-io - machines-process + # on behalf of Bryan O'Sullivan @bos + - wreq "Andraz Bajt andraz@bajt.me @edofic": - effect-handlers From bf6b6f3317ea8a1ffacf6a6275e9301cd83692c6 Mon Sep 17 00:00:00 2001 From: "Leza Morais Lutonda (Lemol-C)" Date: Wed, 14 Jan 2015 21:39:27 -0500 Subject: [PATCH 099/233] Add HaskellNet --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8a2daf43..f85b9353 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -662,6 +662,9 @@ packages: - koofr-client - snowflake + "Leza M. Lutonda lemol-c@hotmail.com @lemol": + - HaskellNet + "Jens Petersen juhpetersen@gmail.com @juhp": - cabal-rpm From ef2378e0201cef3eee3d9e241ff32e53a86e7d24 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 15 Jan 2015 07:48:38 +0200 Subject: [PATCH 100/233] Switch to expected failure TomMD/DRBG#7 --- build-constraints.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8a2daf43..ae07cdad 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -705,9 +705,6 @@ packages: # https://github.com/fpco/lts-haskell/issues/5 - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 - # https://github.com/TomMD/DRBG/issues/7 - - DRBG < 0.5.4 || > 0.5.4 - # Package flags are applied to individual packages, and override the values of # global-flags package-flags: @@ -944,6 +941,9 @@ expected-test-failures: # Tests can fail when the build plan fails, which happens arbitrarily. - stackage + # https://github.com/TomMD/DRBG/issues/7 + - DRBG + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 8e2819c14f012a11d73446845222e342494e646a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 15 Jan 2015 08:59:09 +0200 Subject: [PATCH 101/233] Add expected test failure bos/wreq#53 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3726580c..31877f60 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -949,6 +949,9 @@ expected-test-failures: # https://github.com/TomMD/DRBG/issues/7 - DRBG + # https://github.com/bos/wreq/issues/53 + - wreq + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 16d3f85f9b38a10d18149a5d4441a3250e13d449 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 16 Jan 2015 07:13:18 +0200 Subject: [PATCH 102/233] Upper bounds for #415 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 31877f60..e9deb3c3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -710,6 +710,9 @@ packages: # https://github.com/fpco/lts-haskell/issues/5 - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 + # https://github.com/fpco/stackage/issues/415 + - hackage-db < 1.12 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 993dfbefb2ab2ab42575053eb0310f013a34a4d9 Mon Sep 17 00:00:00 2001 From: George Giorgidze Date: Fri, 16 Jan 2015 22:38:24 +0000 Subject: [PATCH 103/233] Whitespace only --- build-constraints.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e9deb3c3..6168981d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -657,8 +657,8 @@ packages: - machines-io - machines-process # on behalf of Bryan O'Sullivan @bos - - wreq - + - wreq + "Andraz Bajt andraz@bajt.me @edofic": - effect-handlers - koofr-client From b5466165eb36f7bd996f81902d63bbd8592976cd Mon Sep 17 00:00:00 2001 From: George Giorgidze Date: Fri, 16 Jan 2015 22:39:10 +0000 Subject: [PATCH 104/233] Add set-monad to Stackage --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6168981d..bff07903 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -440,6 +440,7 @@ packages: "George Giorgidze ": - HCodecs - YampaSynth + - set-monad "Phil Hargett ": - courier From eddc392c5d5f3aff5350e36083402cb5f816192c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 17 Jan 2015 21:41:27 +0200 Subject: [PATCH 105/233] Expected test failure vincenthz/tasty-kat#1 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index bff07903..08077dab 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -956,6 +956,9 @@ expected-test-failures: # https://github.com/bos/wreq/issues/53 - wreq + # https://github.com/vincenthz/tasty-kat/issues/1 + - tasty-kat + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 347a6d18433a907b49fa94b29fc9bf32bb01da1e Mon Sep 17 00:00:00 2001 From: Omari Norman Date: Sat, 17 Jan 2015 22:22:20 -0500 Subject: [PATCH 106/233] add multiarg, prednote, cartel; remove rainbow-tests --- build-constraints.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 08077dab..253b3c79 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -121,8 +121,10 @@ packages: "Omari Norman ": - barecheck - rainbow - - rainbow-tests - quickpull + - multiarg + - prednote + - cartel "Neil Mitchell": - hlint From bf0d7efbcab29049f410d5096482fd532158027a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 19 Jan 2015 06:03:34 +0200 Subject: [PATCH 107/233] Upper bounds for #421 --- build-constraints.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 08077dab..1070803e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -121,7 +121,8 @@ packages: "Omari Norman ": - barecheck - rainbow - - rainbow-tests + # https://github.com/fpco/stackage/issues/421 + #- rainbow-tests - quickpull "Neil Mitchell": From 8833ca229a4caac550c61c3f44d2b41d8bd10246 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 19 Jan 2015 07:34:37 +0200 Subject: [PATCH 108/233] Revert "Upper bounds for #421" Addressed by PR #420. Closes #421 This reverts commit bf0d7efbcab29049f410d5096482fd532158027a. --- build-constraints.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1070803e..08077dab 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -121,8 +121,7 @@ packages: "Omari Norman ": - barecheck - rainbow - # https://github.com/fpco/stackage/issues/421 - #- rainbow-tests + - rainbow-tests - quickpull "Neil Mitchell": From b90506c78680f49df407100792cbb018a782ca00 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 19 Jan 2015 10:50:07 +0100 Subject: [PATCH 109/233] Add tttool --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 253b3c79..0eae9493 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -456,6 +456,7 @@ packages: - circle-packing - arbtt - ghc-heap-view + - tttool "Aditya Bhargava Date: Mon, 19 Jan 2015 11:47:55 +0100 Subject: [PATCH 110/233] Add old-locale flag for tttool (#422) --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0eae9493..f80f81a1 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -749,6 +749,8 @@ package-flags: # GHC 7.10 remove aeson: old-locale: true + tttool: + old-locale: true hxt: network-uri: true From 041f21621a6e41af291e52e4e04269703ec92aa4 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 19 Jan 2015 23:51:59 +0100 Subject: [PATCH 111/233] Add gipeda --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index f80f81a1..c46eba24 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -457,6 +457,7 @@ packages: - arbtt - ghc-heap-view - tttool + - gipeda "Aditya Bhargava Date: Wed, 21 Jan 2015 04:10:18 +0200 Subject: [PATCH 112/233] More upper bounds for #389 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c46eba24..5f0d7bf3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -691,6 +691,7 @@ packages: # https://github.com/fpco/stackage/issues/389 - lens < 4.7 + - hsdev < 0.1.3.3 # https://github.com/fpco/stackage/issues/390 # NOTE: When this issue is resolved, remove the expected test failure From 06563467b87a503ac2275c541b1d3ef0bb62abd6 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 22 Jan 2015 15:16:28 +0200 Subject: [PATCH 113/233] Upper bound for #424 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 5f0d7bf3..ade038c0 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -719,6 +719,9 @@ packages: # https://github.com/fpco/stackage/issues/415 - hackage-db < 1.12 + # https://github.com/fpco/stackage/issues/424 + - control-monad-free < 0.6 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From f5bbf9e547866a3fa409bb82276b86ea28cb330c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 22 Jan 2015 15:45:42 +0200 Subject: [PATCH 114/233] Temporarily skip tests jgm/zip-archive#23 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index ade038c0..c377310b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -819,6 +819,9 @@ skipped-tests: # https://github.com/Soostone/retry/issues/18 - retry + # https://github.com/jgm/zip-archive/issues/23 + - zip-archive + # Tests which we should build and run, but which are expected to fail. We # should not fail a build based on a test failure for one of these packages. expected-test-failures: From b4586e991e5ebf294a94d7c04a877357ec71d86d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 23 Jan 2015 00:09:10 +0200 Subject: [PATCH 115/233] Don't die due to missing tool jgm/zip-archive#23 --- Stackage/PerformBuild.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 58821125..c74b449a 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -88,7 +88,9 @@ waitForDeps toolMap packageMap activeComps bp pi action = do case lookup exe toolMap >>= fromNullable . map checkPackage . setToList of Nothing | isCoreExe exe -> return () - | otherwise -> throwSTM $ ToolMissing exe + -- https://github.com/jgm/zip-archive/issues/23 + -- | otherwise -> throwSTM $ ToolMissing exe + | otherwise -> return () Just packages -> ofoldl1' (<|>) packages action where From d580bfca5f22d7920ccb124ea71f8e9e0ff5377c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 23 Jan 2015 00:09:45 +0200 Subject: [PATCH 116/233] Remove skipped test jgm/zip-archive#23 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index c377310b..ade038c0 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -819,9 +819,6 @@ skipped-tests: # https://github.com/Soostone/retry/issues/18 - retry - # https://github.com/jgm/zip-archive/issues/23 - - zip-archive - # Tests which we should build and run, but which are expected to fail. We # should not fail a build based on a test failure for one of these packages. expected-test-failures: From 4e9c9d1ffa428e6f060cde9fc86dd771912b5da5 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 25 Jan 2015 14:32:06 +0200 Subject: [PATCH 117/233] Upper bound for #426 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index ade038c0..f7496850 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -722,6 +722,9 @@ packages: # https://github.com/fpco/stackage/issues/424 - control-monad-free < 0.6 + # https://github.com/fpco/stackage/issues/426 + - utf8-string < 1 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 6e7f19624d1abb20c26b5a3008146200411496db Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 27 Jan 2015 15:20:35 +0200 Subject: [PATCH 118/233] Turn off old-time flag for tar --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index f7496850..815c5972 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -773,6 +773,9 @@ package-flags: text: integer-simple: false + tar: + old-time: false + # By skipping a test suite, we do not pull in the build dependencies skipped-tests: - ReadArgs # old version of hspec From c48d50b851c54a612f3704f525a8b50fff7c881f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 27 Jan 2015 15:24:19 +0200 Subject: [PATCH 119/233] Remove expected failure --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 815c5972..52f12682 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -972,9 +972,6 @@ expected-test-failures: # https://github.com/bos/wreq/issues/53 - wreq - # https://github.com/vincenthz/tasty-kat/issues/1 - - tasty-kat - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From d75573dfbacd4228414f08d26fe1e9de9d506228 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 27 Jan 2015 20:13:59 +0200 Subject: [PATCH 120/233] Expected test failure ndmitchell/hoogle#96 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 52f12682..1658197e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -972,6 +972,9 @@ expected-test-failures: # https://github.com/bos/wreq/issues/53 - wreq + # https://github.com/ndmitchell/hoogle/issues/96 + - hoogle + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 6ade0e650b175dc8821f8007dc3e2946438995a7 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Thu, 29 Jan 2015 04:13:36 -0800 Subject: [PATCH 121/233] Add ghc-heap-view to skipped-profiling --- build-constraints.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1658197e..a0827469 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1012,7 +1012,9 @@ skipped-benchmarks: # sometimes falls out-of-sync on hasql-postgres - hasql -skipped-profiling: [] +skipped-profiling: + # https://github.com/nomeata/ghc-heap-view/commit/8d198eb8fbbad2ce0c4527c781659f35b8909c04#diff-8288955e209cfbead5b318a8598be9c0R10 + - ghc-heap-view # Mapping from Github account holding a package to the Github users who should # be pinged on failure. If no value is specified here, then the owning account From 462c0d0ce5918e3ee5de0836aade7bbb251b3434 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 29 Jan 2015 17:41:05 +0200 Subject: [PATCH 122/233] Remove ChasingBottoms constraints --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1658197e..4eb1f4c3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -713,9 +713,6 @@ packages: # https://github.com/fpco/stackage/issues/410 - elm-package < 0.4 - # https://github.com/fpco/lts-haskell/issues/5 - - ChasingBottoms < 1.3.0.10 || > 1.3.0.10 - # https://github.com/fpco/stackage/issues/415 - hackage-db < 1.12 From 13c020a72a57925ebc0d3af991cd4cc36af38cea Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 29 Jan 2015 17:41:14 +0200 Subject: [PATCH 123/233] Extra #426 constraint --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 4eb1f4c3..b561b922 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -721,6 +721,7 @@ packages: # https://github.com/fpco/stackage/issues/426 - utf8-string < 1 + - language-javascript < 0.5.13.1 # Package flags are applied to individual packages, and override the values of # global-flags From 011c5f01ed4d922d88739e12e0e591c04d0ad4ef Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 29 Jan 2015 18:11:59 +0200 Subject: [PATCH 124/233] Remove expected hoogle failure --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 58ef57e4..52775e5e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -977,9 +977,6 @@ expected-test-failures: # https://github.com/bos/wreq/issues/53 - wreq - # https://github.com/ndmitchell/hoogle/issues/96 - - hoogle - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 003db2f02b160331fe421a8f1c8fb08346b30481 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 29 Jan 2015 18:25:16 +0200 Subject: [PATCH 125/233] Remove dupe --- build-constraints.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index c7b1c330..c9bcfbdb 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -183,7 +183,6 @@ packages: - crypto-random-api - hit - language-java - - language-java - libgit - pem - siphash From 3b863ccf7c11cc835805e92ebe938505617fd744 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 29 Jan 2015 18:25:25 +0200 Subject: [PATCH 126/233] Remove unneeded constraint --- build-constraints.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index c9bcfbdb..a4075e4d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -727,7 +727,6 @@ packages: # https://github.com/fpco/stackage/issues/426 - utf8-string < 1 - - language-javascript < 0.5.13.1 # Package flags are applied to individual packages, and override the values of # global-flags From f51b86e165f109930e462f110bc0155215824e47 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Thu, 29 Jan 2015 14:03:54 -0800 Subject: [PATCH 127/233] Add `install` subcommand. Used to install a Stackage snapshot from a build plan. --- Stackage/InstallBuild.hs | 96 ++++++++++++++++++++++++++++++++++++++++ app/stackage.hs | 67 ++++++++++++++++++++++++++-- stackage.cabal | 2 + 3 files changed, 161 insertions(+), 4 deletions(-) create mode 100644 Stackage/InstallBuild.hs diff --git a/Stackage/InstallBuild.hs b/Stackage/InstallBuild.hs new file mode 100644 index 00000000..abe8a14e --- /dev/null +++ b/Stackage/InstallBuild.hs @@ -0,0 +1,96 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +module Stackage.InstallBuild + ( InstallFlags (..) + , BuildPlanSource (..) + , installBuild + ) where + +import qualified Codec.Archive.Tar as Tar +import qualified Codec.Compression.GZip as GZip +import qualified Data.Yaml as Yaml +import Network.HTTP.Client +import Network.HTTP.Client.TLS (tlsManagerSettings) +import Stackage.BuildPlan +import Stackage.CheckBuildPlan +import Stackage.PerformBuild +import Stackage.Prelude +import System.IO (BufferMode (LineBuffering), hSetBuffering) + +-- | Flags passed in from the command line. +data InstallFlags = InstallFlags + { ifPlanSource :: !BuildPlanSource + , ifInstallDest :: !FilePath + , ifLogDir :: !(Maybe FilePath) + , ifJobs :: !Int + , ifGlobalInstall :: !Bool + , ifEnableTests :: !Bool + , ifEnableLibProfiling :: !Bool + , ifVerbose :: !Bool + , ifSkipCheck :: !Bool + } deriving (Show) + +-- | Source for build plan. +data BuildPlanSource = BPSBundleWeb String + | BPSFile FilePath + deriving (Show) + +getPerformBuild :: BuildPlan -> InstallFlags -> PerformBuild +getPerformBuild plan InstallFlags{..} = + PerformBuild + { pbPlan = plan + , pbInstallDest = ifInstallDest + , pbLogDir = fromMaybe (ifInstallDest "logs") ifLogDir + , pbLog = hPut stdout + , pbJobs = ifJobs + , pbGlobalInstall = ifGlobalInstall + , pbEnableTests = ifEnableTests + , pbEnableLibProfiling = ifEnableLibProfiling + , pbVerbose = ifVerbose + , pbAllowNewer = ifSkipCheck + } + +-- | Install stackage from an existing build plan. +installBuild :: InstallFlags -> IO () +installBuild installFlags@InstallFlags{..} = do + hSetBuffering stdout LineBuffering + + putStrLn $ "Loading build plan" + plan <- case ifPlanSource of + BPSBundleWeb url -> withManager tlsManagerSettings $ \man -> do + req <- parseUrl url + res <- httpLbs req man + planBSL <- getPlanEntry $ Tar.read $ GZip.decompress (responseBody res) + decodeBuildPlan planBSL + BPSFile path -> Yaml.decodeFileEither (fpToString path) >>= either throwM return + + if ifSkipCheck + then putStrLn "Skipping build plan check" + else do + putStrLn "Checking build plan" + checkBuildPlan plan + + putStrLn "Performing build" + performBuild (getPerformBuild plan installFlags) >>= mapM_ putStrLn + + where + getPlanEntry Tar.Done = throwIO NoBuildPlanException + getPlanEntry (Tar.Fail e) = throwIO e + getPlanEntry (Tar.Next entry entries) + | Tar.entryPath entry == "build-plan.yaml" = + case Tar.entryContent entry of + Tar.NormalFile bs _ -> return bs + _ -> throwIO NoBuildPlanException + | otherwise = getPlanEntry entries + + decodeBuildPlan = + either throwIO return . Yaml.decodeEither' . toStrict + +data InstallBuildException = NoBuildPlanException + deriving (Typeable) +instance Exception InstallBuildException +instance Show InstallBuildException where + show NoBuildPlanException = "Bundle has missing or invalid build-plan.yaml" diff --git a/app/stackage.hs b/app/stackage.hs index 1f61496f..8fdd2833 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -7,8 +7,10 @@ import Data.Monoid import Data.String (fromString) import Data.Version import Options.Applicative +import Filesystem.Path.CurrentOS (decodeString) import Paths_stackage (version) import Stackage.CompleteBuild +import Stackage.InstallBuild main :: IO () main = @@ -25,9 +27,9 @@ main = help "Show this help text" versionOption = infoOption - ("fpbuild version " ++ showVersion version) + ("stackage version " ++ showVersion version) (long "version" <> - help "Show fpbuild version") + help "Show stackage version") config = subparser $ mconcat @@ -55,12 +57,19 @@ main = (const justCheck) (pure ()) "check" - "Just check that the build plan is ok"] + "Just check that the build plan is ok" + , cmnd + installBuild + installFlags + "install" + "Install a snapshot from an existing build plan"] + cmnd exec parse name desc = command name $ info - (fmap exec parse) + (fmap exec (parse <**> helpOption)) (progDesc desc) + buildFlags = BuildFlags <$> fmap @@ -86,3 +95,53 @@ main = nightlyUploadFlags = fromString <$> strArgument (metavar "DATE" <> help "Date, in YYYY-MM-DD format") + + installFlags = + InstallFlags <$> + (fmap + BPSBundleWeb + (strOption + (long "bundle" <> + metavar "URL" <> + help "Stackage bundle containing build plan")) <|> + fmap + (BPSFile . decodeString) + (strOption + (long "build-plan" <> + metavar "PATH" <> + help "Build-plan YAML file"))) <*> + fmap + decodeString + (strArgument + (metavar "DESTINATION-PATH" <> + help "Destination directory path")) <*> + (fmap + (Just . decodeString) + (strOption + (long "log-dir" <> + metavar "PATH" <> + help "Location of log files (default DESTINATION-PATH/logs)")) <|> + pure Nothing) <*> + option + auto + (long "jobs" <> + metavar "NUMBER" <> + showDefault <> value 8 <> + help "Number of threads") <*> + switch + (long "global" <> + help "Install in global package database") <*> + fmap + not + (switch + (long "skip-tests" <> + help "Skip build and running the test suites")) <*> + switch + (long "enable-library-profiling" <> + help "Enable profiling when building") <*> + switch + (long "verbose" <> short 'v' <> + help "Output verbose detail about the build steps") <*> + switch + (long "skip-check" <> + help "Skip the check phase, and pass --allow-newer to cabal configure") diff --git a/stackage.cabal b/stackage.cabal index c5e848e7..94b42da9 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -24,6 +24,7 @@ library Stackage.CheckBuildPlan Stackage.UpdateBuildPlan Stackage.GithubPings + Stackage.InstallBuild Stackage.PackageDescription Stackage.ServerBundle Stackage.Upload @@ -70,6 +71,7 @@ executable stackage build-depends: base , stackage , optparse-applicative >= 0.11 + , system-filepath ghc-options: -rtsopts -threaded -with-rtsopts=-N test-suite spec From 623926418a92b7fe6490eeb9640fb7f6cc6de7e4 Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Fri, 30 Jan 2015 13:48:11 +0000 Subject: [PATCH 128/233] Update build-constraints.yaml --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c7b1c330..74885423 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -682,6 +682,9 @@ packages: - pipes-binary - pipes-network + "Tomas Carnecky": + - rethinkdb-client-driver + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From e8ae7d8b4c34078c4af59294d2b0f842b842235f Mon Sep 17 00:00:00 2001 From: Chris Done Date: Sun, 1 Feb 2015 16:06:47 +0100 Subject: [PATCH 129/233] Add upper bound on th-sugar @snoyberg this build plan checks out. --- build-constraints.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 74885423..0dca78c9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -100,7 +100,10 @@ packages: - criterion - th-lift - singletons - - th-desugar + + # https://github.com/fpco/stackage/issues/433 + - th-desugar < 1.5 + - quickcheck-assertions - distributed-process-simplelocalnet From 6188c0c3bb4f68911c55e5bdba314e7ce2e151aa Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 2 Feb 2015 04:15:43 +0200 Subject: [PATCH 130/233] Haddock failure wereHamster/rethinkdb-client-driver#1 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 15d961a9..14f2be28 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -992,6 +992,9 @@ expected-haddock-failures: # https://github.com/leventov/yarr/issues/5 - yarr + # https://github.com/wereHamster/rethinkdb-client-driver/issues/1 + - rethinkdb-client-driver + # Benchmarks which should not be built. Note that Stackage does *not* generally # build benchmarks. The difference here will be whether dependencies for these # benchmarks are included or not. From 76f13a53bf72e6bc9da83dc99bc7930a4930132a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 2 Feb 2015 04:25:48 +0200 Subject: [PATCH 131/233] Revert "Add upper bound on th-sugar" This reverts commit e8ae7d8b4c34078c4af59294d2b0f842b842235f. --- build-constraints.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 14f2be28..1d08d2d3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -100,10 +100,7 @@ packages: - criterion - th-lift - singletons - - # https://github.com/fpco/stackage/issues/433 - - th-desugar < 1.5 - + - th-desugar - quickcheck-assertions - distributed-process-simplelocalnet From a6518d44464a1760c768c7f3711eaa7e216a2e20 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 2 Feb 2015 05:41:57 +0200 Subject: [PATCH 132/233] Expected test failure --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1d08d2d3..74d4a007 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -978,6 +978,9 @@ expected-test-failures: # https://github.com/bos/wreq/issues/53 - wreq + # Requires local database running + - rethinkdb-client-driver + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From c8c499755af03ffa460c7af4468b2872d4aaa592 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 5 Feb 2015 07:12:59 +0200 Subject: [PATCH 133/233] Upper bound for d12frosted/CanonicalPath#3 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 74d4a007..4e6b9c81 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -731,6 +731,9 @@ packages: # https://github.com/fpco/stackage/issues/426 - utf8-string < 1 + # https://github.com/d12frosted/CanonicalPath/issues/3 + - system-canonicalpath < 0.3 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 67adda68ff4b04156658288084cf22f2cab72794 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 5 Feb 2015 20:56:22 +0200 Subject: [PATCH 134/233] Install fixed cabal-install (avoid test streaming bug) --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a90db9b..4fb4f838 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,11 +16,11 @@ RUN rm /tmp/debian-bootstrap.sh RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install-1.20 ghc-7.8.4 -ENV PATH /opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH /home/stackage/.cabal/bin:/opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN cabal update ADD . /tmp/stackage -RUN cd /tmp/stackage && cabal install . hscolour +RUN cd /tmp/stackage && cabal install . hscolour cabal-install --constraint "Cabal < 1.22" RUN cp $HOME/.cabal/bin/* /usr/local/bin RUN rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage From d1f366e133e0593dc66e2b9229719a74125f4caf Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 5 Feb 2015 22:14:52 +0200 Subject: [PATCH 135/233] Put /usr/local before /opt for custom cabal to take precedence --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4fb4f838..54580bda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN rm /tmp/debian-bootstrap.sh RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install-1.20 ghc-7.8.4 -ENV PATH /home/stackage/.cabal/bin:/opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH /home/stackage/.cabal/bin:/usr/local/sbin:/usr/local/bin:/opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN cabal update ADD . /tmp/stackage From 8568f83fee2371c6b690b481048ea9196e385ab0 Mon Sep 17 00:00:00 2001 From: Alexandr Kurilin Date: Thu, 5 Feb 2015 12:35:39 -0800 Subject: [PATCH 136/233] Add bcrypt package --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 4e6b9c81..e942c32b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -684,6 +684,9 @@ packages: "Tomas Carnecky": - rethinkdb-client-driver + "Alexandr Kurilin alex@kurilin.net @alex_kurilin": + - bcrypt + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 308cc51aa133adca7f985a5cddf9161c3be4a40e Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 6 Feb 2015 00:07:17 +0200 Subject: [PATCH 137/233] Add .git to dockerignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index e09d9880..383463ca 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,4 @@ logs cabal.sandbox.config tarballs *.yaml +.git From 8ac653efd73495ade2451af3e5ff4b5b8aa4e60f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 6 Feb 2015 00:15:18 +0200 Subject: [PATCH 138/233] Collapse some layers --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54580bda..a83c42bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,6 @@ ENV PATH /home/stackage/.cabal/bin:/usr/local/sbin:/usr/local/bin:/opt/ghc/7.8.4 RUN cabal update ADD . /tmp/stackage -RUN cd /tmp/stackage && cabal install . hscolour cabal-install --constraint "Cabal < 1.22" -RUN cp $HOME/.cabal/bin/* /usr/local/bin -RUN rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage +RUN cd /tmp/stackage && cabal install . hscolour cabal-install --constraint "Cabal < 1.22" && cp $HOME/.cabal/bin/* /usr/local/bin && rm -rf $HOME/.cabal $HOME/.ghc /tmp/stackage RUN cd /home/stackage && cabal update && stackage check From f78b47bc5f627e85b0cd0f1baf498c97f11ef896 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 9 Feb 2015 07:22:27 +0200 Subject: [PATCH 139/233] Expected test failure haskell-distributed/distributed-process-execution#2 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index e942c32b..92e7adb1 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -987,6 +987,9 @@ expected-test-failures: # Requires local database running - rethinkdb-client-driver + # https://github.com/haskell-distributed/distributed-process-execution/issues/2 + - distributed-process-execution + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 33cd4c0ec757dd15f3e445097089cd6eb3f7cb57 Mon Sep 17 00:00:00 2001 From: Jeffrey Rosenbluth Date: Mon, 9 Feb 2015 16:16:02 -0500 Subject: [PATCH 140/233] Update build-constraints.yaml --- build-constraints.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 92e7adb1..a5f8a5ea 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -686,6 +686,12 @@ packages: "Alexandr Kurilin alex@kurilin.net @alex_kurilin": - bcrypt + + "Jeffrey Rosenbluth jeffrey.rosenbluth@gmail.com": + - palette + - diagrams-canvas + - diagrams-rasterific + - lucid-svg "Stackage upper bounds": From 6ff05d185c3174b95de98c32b937ae3ac6781e55 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 10 Feb 2015 14:09:23 +0100 Subject: [PATCH 141/233] Adding rasterific-svg & svg-tree --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 92e7adb1..1c748b64 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -332,6 +332,8 @@ packages: - JuicyPixels - FontyFruity - Rasterific + - svg-tree + - rasterific-svg "Patrick Brisbin": - gravatar From d601f51ea1147d1c8a448d9b897d09c236a28085 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Feb 2015 07:09:47 +0200 Subject: [PATCH 142/233] Expected test failure jwiegley/gitlib#42 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1c748b64..cb871e52 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -992,6 +992,9 @@ expected-test-failures: # https://github.com/haskell-distributed/distributed-process-execution/issues/2 - distributed-process-execution + # https://github.com/jwiegley/gitlib/issues/42 + - hlibgit2 + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 7228ab9eb208f74a00d762d2672f05161245e97f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Feb 2015 08:27:03 +0200 Subject: [PATCH 143/233] Skip a test instead of expecting failure --- build-constraints.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 54cb43d6..1fd20945 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -845,6 +845,9 @@ skipped-tests: # https://github.com/Soostone/retry/issues/18 - retry + # https://github.com/jwiegley/gitlib/issues/42 + - hlibgit2 + # Tests which we should build and run, but which are expected to fail. We # should not fail a build based on a test failure for one of these packages. expected-test-failures: @@ -998,9 +1001,6 @@ expected-test-failures: # https://github.com/haskell-distributed/distributed-process-execution/issues/2 - distributed-process-execution - # https://github.com/jwiegley/gitlib/issues/42 - - hlibgit2 - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 4dda9a078050106a4615a2fdd0396655d3f7dd1c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Feb 2015 06:45:43 +0200 Subject: [PATCH 144/233] Upper bound for #440 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1fd20945..04ba737f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -745,6 +745,9 @@ packages: # https://github.com/d12frosted/CanonicalPath/issues/3 - system-canonicalpath < 0.3 + # https://github.com/fpco/stackage/issues/440 + - th-orphans < 0.9 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From b357b5ab1445645f872d7ee0546ae98eedc107e4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Feb 2015 06:46:11 +0200 Subject: [PATCH 145/233] Flag fixes for mtl-compat --- build-constraints.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 04ba737f..7e1e13af 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -799,6 +799,10 @@ package-flags: tar: old-time: false + mtl-compat: + two-point-one: true + two-point-two: false + # By skipping a test suite, we do not pull in the build dependencies skipped-tests: - ReadArgs # old version of hspec From 26f0ec3674cb35a71bcae3d9b5bebff33dacd718 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Feb 2015 15:13:12 +0200 Subject: [PATCH 146/233] Upper bound for #442 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 7e1e13af..33bd3b2e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -748,6 +748,9 @@ packages: # https://github.com/fpco/stackage/issues/440 - th-orphans < 0.9 + # https://github.com/fpco/stackage/issues/442 + - blaze-builder < 0.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 96ff559f4815fd50e621ea5ef1329ad3311eb76a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Feb 2015 15:13:20 +0200 Subject: [PATCH 147/233] Upper bound for #443 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 33bd3b2e..ae747353 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -751,6 +751,9 @@ packages: # https://github.com/fpco/stackage/issues/442 - blaze-builder < 0.4 + # https://github.com/fpco/stackage/issues/443 + - exceptions < 0.7 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From d06aef22c9b8bc49cd3c0acef8d783fe86433aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabr=C3=ADel=20Arth=C3=BAr=20P=C3=A9tursson?= Date: Thu, 12 Feb 2015 13:36:28 +0000 Subject: [PATCH 148/233] Add sdl2 package Note that the package depends on sdl2 >= 2.0.3 via pkg-config. --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index ae747353..f3c773ee 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -695,6 +695,9 @@ packages: - diagrams-rasterific - lucid-svg + "Gabríel Arthúr Pétursson gabriel@system.is": + - sdl2 + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From e66b409ba29751b41a5380ab228768b15a3afa40 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Feb 2015 07:42:58 +0200 Subject: [PATCH 149/233] Add sdl2 system packages Pinging @manny-fp --- debian-bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 2e423c25..c069dcb1 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -12,6 +12,7 @@ add-apt-repository -y ppa:chris-lea/zeromq add-apt-repository -y ppa:floe/libtisch +add-apt-repository -y ppa:zoogie/sdl2-snapshots apt-get update apt-get install -y \ build-essential \ @@ -47,4 +48,5 @@ apt-get install -y \ libgd2-xpm-dev \ libyaml-dev \ liblzma-dev \ + libsdl2-dev \ libzmq3-dev From 8cb0cc928da8aceead0c70ec28827b4f2c92dae5 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Feb 2015 07:44:17 +0200 Subject: [PATCH 150/233] Extra #440 upper bound --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index f3c773ee..e6ddaf71 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -750,6 +750,7 @@ packages: # https://github.com/fpco/stackage/issues/440 - th-orphans < 0.9 + - file-location < 0.4.7 # https://github.com/fpco/stackage/issues/442 - blaze-builder < 0.4 From 274eab8c3ea14e82114d71494e182f72428d883d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Feb 2015 08:45:25 +0200 Subject: [PATCH 151/233] Remove upper bounds and close #370 #401 In this process, I had to remove MusicBrainz. This could no longer be held off, as the old monad-control was causing problems elsewhere in the build. --- build-constraints.yaml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e6ddaf71..45862f89 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -466,7 +466,9 @@ packages: "Clint Adams ": - hOpenPGP - openpgp-asciiarmor - - MusicBrainz + # Removed due to non-responsiveness on: + # https://github.com/fpco/stackage/issues/370 + # - MusicBrainz - DAV - hopenpgp-tools @@ -706,12 +708,6 @@ packages: # https://github.com/fpco/stackage/issues/291 - random < 1.0.1.3 - # https://github.com/fpco/stackage/issues/370 - - monad-control < 1 - - lifted-async < 0.3 - - scotty < 0.9.1 - - hoauth2 < 0.4.4 - # https://github.com/fpco/stackage/issues/389 - lens < 4.7 - hsdev < 0.1.3.3 @@ -724,9 +720,6 @@ packages: # https://github.com/fpco/stackage/issues/398 - monoid-subclasses < 0.4 - # https://github.com/fpco/stackage/issues/401 - - happstack-server < 7.4 - # https://github.com/fpco/stackage/issues/402 - vector-space < 0.9 From 9f3e6ce8e581a4db7004bcb65056c08a53f35e69 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Feb 2015 08:52:00 +0200 Subject: [PATCH 152/233] Remove upper bounds and close #398 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 45862f89..6e11f220 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -717,9 +717,6 @@ packages: # for language-ecmascript as well. - language-ecmascript < 0.17 - # https://github.com/fpco/stackage/issues/398 - - monoid-subclasses < 0.4 - # https://github.com/fpco/stackage/issues/402 - vector-space < 0.9 From 48a2022c8f29488c5f5e79b38b57b2707a49bb83 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Fri, 13 Feb 2015 09:54:18 +0100 Subject: [PATCH 153/233] Add hindent and descriptive --- build-constraints.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6e11f220..0ffb130c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -209,8 +209,10 @@ packages: - scrobble - shell-conduit - sourcemap + - hindent + - descriptive # requires old haddock currently - haskell-docs - # TODO: Add hindent and structured-haskell-mode once they've been ported to HSE 1.16. + # TODO: Add structured-haskell-mode once they've been ported to HSE 1.16. # GHC 7.6 # "Alberto G. Corona ": @@ -690,7 +692,7 @@ packages: "Alexandr Kurilin alex@kurilin.net @alex_kurilin": - bcrypt - + "Jeffrey Rosenbluth jeffrey.rosenbluth@gmail.com": - palette - diagrams-canvas From 3b7c0593ed5d69aba5af3b992bd80dd8bba0306c Mon Sep 17 00:00:00 2001 From: Chris Done Date: Fri, 13 Feb 2015 09:58:47 +0100 Subject: [PATCH 154/233] Add wrap --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0ffb130c..c339838d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -211,6 +211,7 @@ packages: - sourcemap - hindent - descriptive + - wrap # requires old haddock currently - haskell-docs # TODO: Add structured-haskell-mode once they've been ported to HSE 1.16. From 7e25cf072c9b27659b169ece24b80de33bbbc9c7 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 15 Feb 2015 07:28:36 +0200 Subject: [PATCH 155/233] Upper bound for #445 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c339838d..c2e644a6 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -751,6 +751,9 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 + # https://github.com/fpco/stackage/issues/445 + - semigroupoids < 4.3 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From faf31a9f414abf9b37a932985bd7cbb670461b68 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 15 Feb 2015 07:28:56 +0200 Subject: [PATCH 156/233] Upper bound for #446 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c2e644a6..8efa29cf 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -707,6 +707,7 @@ packages: # Force a specific version that's compatible with transformers 0.3 - transformers-compat == 0.3.3.3 + - mtl-compat < 0.2 # https://github.com/fpco/stackage/issues/446 # https://github.com/fpco/stackage/issues/291 - random < 1.0.1.3 From d367361857aceaff0f99d7e47a9d868f9807a062 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 15 Feb 2015 14:59:00 +0200 Subject: [PATCH 157/233] Temporarily disable fpco-api --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8efa29cf..e9f42035 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -72,7 +72,7 @@ packages: - fixed-list - foreign-store - formatting - - fpco-api + #- fpco-api - gtk2hs-buildtools - happy - histogram-fill From 8b5b0db0170437dbf24231e97b2e0d4d3606c61c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 15 Feb 2015 15:04:22 +0200 Subject: [PATCH 158/233] Add back MusicBrainz --- build-constraints.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e9f42035..ddfd74f3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -469,9 +469,7 @@ packages: "Clint Adams ": - hOpenPGP - openpgp-asciiarmor - # Removed due to non-responsiveness on: - # https://github.com/fpco/stackage/issues/370 - # - MusicBrainz + - MusicBrainz - DAV - hopenpgp-tools From 287e10cb9c2657f47ef9b43637b3e3b513fac06f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 15 Feb 2015 15:04:52 +0200 Subject: [PATCH 159/233] Un-skip hlibgit2 tests --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index ddfd74f3..4e185683 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -857,9 +857,6 @@ skipped-tests: # https://github.com/Soostone/retry/issues/18 - retry - # https://github.com/jwiegley/gitlib/issues/42 - - hlibgit2 - # Tests which we should build and run, but which are expected to fail. We # should not fail a build based on a test failure for one of these packages. expected-test-failures: From 9106add72590c086f47f28c6642c07682491c11a Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 15 Feb 2015 20:04:00 +0100 Subject: [PATCH 160/233] Add Hakyll to Stackage --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 4e185683..76fbc89d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -152,6 +152,7 @@ packages: "Jasper Van der Jeugt": - blaze-html - blaze-markup + - hakyll - stylish-haskell "Antoine Latter": From 19cf63976925ca64b318857bfabc7cb5a2e27ce1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 16 Feb 2015 11:55:00 +0200 Subject: [PATCH 161/233] Upper bound for #443 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 76fbc89d..0396bcfe 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -750,6 +750,7 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 + - resourcet < 1.1.4 # https://github.com/fpco/stackage/issues/445 - semigroupoids < 4.3 From e62226e92c9904deb7748469dc414e5653f642d1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 02:12:21 +0200 Subject: [PATCH 162/233] Remove upper bounds and close #389 --- build-constraints.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0396bcfe..c4de7765 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -315,8 +315,9 @@ packages: "Brent Yorgey ": - active - - BlogLiterately - - BlogLiterately-diagrams + # Temporarily disabled due to restrictive lens upper bound + #- BlogLiterately + #- BlogLiterately-diagrams - diagrams - diagrams-builder - diagrams-contrib @@ -711,10 +712,6 @@ packages: # https://github.com/fpco/stackage/issues/291 - random < 1.0.1.3 - # https://github.com/fpco/stackage/issues/389 - - lens < 4.7 - - hsdev < 0.1.3.3 - # https://github.com/fpco/stackage/issues/390 # NOTE: When this issue is resolved, remove the expected test failure # for language-ecmascript as well. From 635fc73f55c71a94676198a0430bbf4d4267211a Mon Sep 17 00:00:00 2001 From: Leon Mergen Date: Tue, 17 Feb 2015 12:35:05 +0700 Subject: [PATCH 163/233] Update build-constraints.yaml --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c4de7765..019851b6 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -703,6 +703,9 @@ packages: "Gabríel Arthúr Pétursson gabriel@system.is": - sdl2 + "Leon Mergen leon@solatis.com": + - network-attoparsec + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 58a621bcbabe1d13133c9ac48e72d718c5fa6d8b Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 07:46:51 +0200 Subject: [PATCH 164/233] Remove no-longer-needed upper bound --- build-constraints.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 019851b6..e291aff3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -750,7 +750,6 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 - - resourcet < 1.1.4 # https://github.com/fpco/stackage/issues/445 - semigroupoids < 4.3 From 4cb98cd9ed782df8711af480ec53dce783a2452a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 11:58:36 +0200 Subject: [PATCH 165/233] Include some missing system files --- debian-bootstrap.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index c069dcb1..0beb5273 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -18,6 +18,9 @@ apt-get install -y \ build-essential \ libncurses-dev \ git \ + wget \ + m4 \ + texlive-binaries \ libgmp3c2 \ libgmp3-dev \ zlib1g-dev \ @@ -38,7 +41,6 @@ apt-get install -y \ libpq-dev \ libicu-dev \ libssl-dev \ - nettle-dev \ libgsl0-dev \ libblas-dev \ liblapack-dev \ @@ -50,3 +52,15 @@ apt-get install -y \ liblzma-dev \ libsdl2-dev \ libzmq3-dev + +mkdir /tmp/nettle-build +( +cd /tmp/nettle-build +wget https://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz +tar zxf nettle-2.7.1.tar.gz +cd nettle-2.7.1 +./configure +make +make install +) +rm -rf /tmp/nettle-build From 613fc07e8e6295520b49da940d6d7fbc9605e950 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 15:41:08 +0200 Subject: [PATCH 166/233] Skip test suite jberryman/directory-tree#4 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index e291aff3..a45cbfe3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1011,6 +1011,9 @@ expected-test-failures: # https://github.com/haskell-distributed/distributed-process-execution/issues/2 - distributed-process-execution + # https://github.com/jberryman/directory-tree/issues/4 + - directory-tree + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 4761d55ce4c9646ab48bc232f1a34810583136c1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 15:41:26 +0200 Subject: [PATCH 167/233] Docker image fixes --- build-constraints.yaml | 4 ++++ debian-bootstrap.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index a45cbfe3..9c5c2591 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1011,6 +1011,10 @@ expected-test-failures: # https://github.com/haskell-distributed/distributed-process-execution/issues/2 - distributed-process-execution + # Seems to depend on mtl being installed in user package database, which + # isn't always the case (e.g., build server) + - mtl + # https://github.com/jberryman/directory-tree/issues/4 - directory-tree diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 0beb5273..0f296009 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -37,6 +37,7 @@ apt-get install -y \ llvm \ libbz2-dev \ libjudy-dev \ + libsqlite3-dev \ libmysqlclient-dev \ libpq-dev \ libicu-dev \ @@ -51,6 +52,7 @@ apt-get install -y \ libyaml-dev \ liblzma-dev \ libsdl2-dev \ + libxss-dev \ libzmq3-dev mkdir /tmp/nettle-build @@ -59,7 +61,7 @@ cd /tmp/nettle-build wget https://ftp.gnu.org/gnu/nettle/nettle-2.7.1.tar.gz tar zxf nettle-2.7.1.tar.gz cd nettle-2.7.1 -./configure +./configure --prefix=/usr make make install ) From 5b72273a9f0fda115514f96589a658c5a25ed74f Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Feb 2015 16:38:07 +0200 Subject: [PATCH 168/233] Remove upper bounds and close #446 --- build-constraints.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 9c5c2591..0ab5775f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -709,8 +709,7 @@ packages: "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 - - transformers-compat == 0.3.3.3 - - mtl-compat < 0.2 # https://github.com/fpco/stackage/issues/446 + - transformers-compat == 0.4.0.3 # https://github.com/fpco/stackage/issues/291 - random < 1.0.1.3 From 6c984bde6781febb7535780dd84665125a62cc54 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 18 Feb 2015 06:47:36 +0200 Subject: [PATCH 169/233] Typo --- build-constraints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0ab5775f..6db0dd3f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1012,7 +1012,7 @@ expected-test-failures: # Seems to depend on mtl being installed in user package database, which # isn't always the case (e.g., build server) - - mtl + - happy # https://github.com/jberryman/directory-tree/issues/4 - directory-tree From d4234b84668eed85b18b43191c2faff79ad05e79 Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Thu, 19 Feb 2015 17:13:23 +1300 Subject: [PATCH 170/233] Add http-media and cabal-test-quickcheck --- build-constraints.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6db0dd3f..8eb473f6 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -706,6 +706,10 @@ packages: "Leon Mergen leon@solatis.com": - network-attoparsec + "Timothy Jones git@zmthy.io @zmthy": + - cabal-test-quickcheck + - http-media + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From bd6c774c02dfa256480fc7c977bf29bd0c423ae4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 19 Feb 2015 07:51:43 +0200 Subject: [PATCH 171/233] Expected test failure massysett/multiarg#4 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6db0dd3f..fb328637 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1017,6 +1017,9 @@ expected-test-failures: # https://github.com/jberryman/directory-tree/issues/4 - directory-tree + # https://github.com/massysett/multiarg/issues/4 + - multiarg + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 7183cf0f77f66a2463da2fd795654708dc9567ec Mon Sep 17 00:00:00 2001 From: Sebastiaan Visser Date: Thu, 19 Feb 2015 11:41:21 +0100 Subject: [PATCH 172/233] Update build-constraints.yaml --- build-constraints.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index fb328637..80e75e4e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -390,9 +390,12 @@ packages: - fay-jquery - fay-text - fay-uri - - fclabels - snaplet-fay + "Sebastiaan Visser ": + - clay + - fclabels + "Rodrigo Setti ": - messagepack - messagepack-rpc From fb5e7af5c04cb158cb8cf2e8a6a8ca0ea57dfca3 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 19 Feb 2015 16:02:03 +0200 Subject: [PATCH 173/233] Remove expected failure --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 80e75e4e..4f9fbbb7 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1020,9 +1020,6 @@ expected-test-failures: # https://github.com/jberryman/directory-tree/issues/4 - directory-tree - # https://github.com/massysett/multiarg/issues/4 - - multiarg - # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 4312df025fd5aa4be9972c3c276945c9cfd65515 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Sat, 21 Feb 2015 12:39:02 +0200 Subject: [PATCH 174/233] Add --skip-haddock -flag --- Stackage/CompleteBuild.hs | 2 ++ Stackage/InstallBuild.hs | 2 ++ Stackage/PerformBuild.hs | 3 ++- app/stackage.hs | 10 ++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index cf74eef2..341be2b4 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -33,6 +33,7 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering) -- | Flags passed in from the command line. data BuildFlags = BuildFlags { bfEnableTests :: !Bool + , bfEnableHaddock :: !Bool , bfDoUpload :: !Bool , bfEnableLibProfile :: !Bool , bfVerbose :: !Bool @@ -203,6 +204,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild , pbJobs = 8 , pbGlobalInstall = False , pbEnableTests = bfEnableTests buildFlags + , pbEnableHaddock = bfEnableHaddock buildFlags , pbEnableLibProfiling = bfEnableLibProfile buildFlags , pbVerbose = bfVerbose buildFlags , pbAllowNewer = bfSkipCheck buildFlags diff --git a/Stackage/InstallBuild.hs b/Stackage/InstallBuild.hs index abe8a14e..a6a6c25f 100644 --- a/Stackage/InstallBuild.hs +++ b/Stackage/InstallBuild.hs @@ -28,6 +28,7 @@ data InstallFlags = InstallFlags , ifJobs :: !Int , ifGlobalInstall :: !Bool , ifEnableTests :: !Bool + , ifEnableHaddock :: !Bool , ifEnableLibProfiling :: !Bool , ifVerbose :: !Bool , ifSkipCheck :: !Bool @@ -48,6 +49,7 @@ getPerformBuild plan InstallFlags{..} = , pbJobs = ifJobs , pbGlobalInstall = ifGlobalInstall , pbEnableTests = ifEnableTests + , pbEnableHaddock = ifEnableHaddock , pbEnableLibProfiling = ifEnableLibProfiling , pbVerbose = ifVerbose , pbAllowNewer = ifSkipCheck diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index c74b449a..e38f8e62 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -62,6 +62,7 @@ data PerformBuild = PerformBuild , pbGlobalInstall :: Bool -- ^ Register packages in the global database , pbEnableTests :: Bool + , pbEnableHaddock :: Bool , pbEnableLibProfiling :: Bool , pbVerbose :: Bool , pbAllowNewer :: Bool @@ -354,7 +355,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = -- dependency's haddocks before this finishes atomically $ putTMVar (piResult sbPackageInfo) True - when (pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do + when (pbEnableHaddock && pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do log' $ "Haddocks " ++ namever hfs <- readTVarIO sbHaddockFiles let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat diff --git a/app/stackage.hs b/app/stackage.hs index 8fdd2833..c8bb4f52 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -77,6 +77,11 @@ main = (switch (long "skip-tests" <> help "Skip build and running the test suites")) <*> + fmap + not + (switch + (long "skip-haddock" <> + help "Skip generating haddock documentation")) <*> fmap not (switch @@ -136,6 +141,11 @@ main = (switch (long "skip-tests" <> help "Skip build and running the test suites")) <*> + fmap + not + (switch + (long "skip-haddock" <> + help "Skip generating haddock documentation")) <*> switch (long "enable-library-profiling" <> help "Enable profiling when building") <*> From 4e2260a869ecc2288b927bf11fee67aca6708165 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 22 Feb 2015 07:03:40 +0200 Subject: [PATCH 175/233] Expected test failure zmthy/http-media#11 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3fc076f6..3318f930 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1024,6 +1024,9 @@ expected-test-failures: # https://github.com/jberryman/directory-tree/issues/4 - directory-tree + # https://github.com/zmthy/http-media/issues/11 + - http-media + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 79b2b13b0e266e7461e66f5ebb7fd8f2f8068ea1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 07:09:16 +0200 Subject: [PATCH 176/233] Upper bound for #453 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3318f930..c9638349 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -760,6 +760,9 @@ packages: # https://github.com/fpco/stackage/issues/445 - semigroupoids < 4.3 + # https://github.com/fpco/stackage/issues/453 + - descriptive < 0.9 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From c7230cd1dbad30c85d79c5a5819a6a0f9754c552 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 07:10:35 +0200 Subject: [PATCH 177/233] Remove upper bounds and close #445 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index c9638349..1a3ea338 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -757,9 +757,6 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 - # https://github.com/fpco/stackage/issues/445 - - semigroupoids < 4.3 - # https://github.com/fpco/stackage/issues/453 - descriptive < 0.9 From 56a37736690957a35eb3fcc1fc137459ef2fc9e1 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 07:11:54 +0200 Subject: [PATCH 178/233] Remove upper bound and close #402 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 1a3ea338..39f6feee 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -726,9 +726,6 @@ packages: # for language-ecmascript as well. - language-ecmascript < 0.17 - # https://github.com/fpco/stackage/issues/402 - - vector-space < 0.9 - # https://github.com/fpco/stackage/issues/407 - HStringTemplate < 0.8 From 42f96904d72e234e52dbe4761a77c05f1217d1cb Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 08:16:19 +0200 Subject: [PATCH 179/233] Temporary upper bound for byorgey/haxr#7 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 39f6feee..abf1e978 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -757,6 +757,9 @@ packages: # https://github.com/fpco/stackage/issues/453 - descriptive < 0.9 + # https://github.com/byorgey/haxr/issues/7 + - haxr < 3000.10.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 8a0e3b20aceb61cec6657360c89eba4c54d771c4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 09:40:21 +0200 Subject: [PATCH 180/233] Add expected test failure ekmett/semigroupoids#18 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index abf1e978..0207887e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1027,6 +1027,9 @@ expected-test-failures: # https://github.com/zmthy/http-media/issues/11 - http-media + # https://github.com/ekmett/semigroupoids/issues/18 + - semigroupoids + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 7be69244306fbb86361b775c3046b219357d73a2 Mon Sep 17 00:00:00 2001 From: Chris Done Date: Mon, 23 Feb 2015 10:54:42 +0100 Subject: [PATCH 181/233] Fix descriptive upper bound on hindent (fixes #453) --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0207887e..953e4ef2 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -754,9 +754,6 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 - # https://github.com/fpco/stackage/issues/453 - - descriptive < 0.9 - # https://github.com/byorgey/haxr/issues/7 - haxr < 3000.10.4 From 240de346305b902b564954e4c3bd750b72a8706b Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 16:30:34 +0200 Subject: [PATCH 182/233] Remove upper bound for byorgey/haxr#7 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 953e4ef2..8708a3c3 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -754,9 +754,6 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 - # https://github.com/byorgey/haxr/issues/7 - - haxr < 3000.10.4 - # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 031ab4e77a0aa25e4856f6ffac8f67e084770c3e Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 16:33:10 +0200 Subject: [PATCH 183/233] Extra #442 upper bounds --- build-constraints.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8708a3c3..b91604c2 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -750,6 +750,8 @@ packages: # https://github.com/fpco/stackage/issues/442 - blaze-builder < 0.4 + - blaze-markup < 0.7 + - blaze-html < 0.8 # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 From b7d0a219db3ec3f813cc8e2ad26e0264d525db2d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 16:34:47 +0200 Subject: [PATCH 184/233] Extra upper bound for #443 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index b91604c2..123b4e8b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -755,6 +755,9 @@ packages: # https://github.com/fpco/stackage/issues/443 - exceptions < 0.7 + - rest-client < 0.5 + - rest-types < 1.13 + - rest-core < 0.35 # Package flags are applied to individual packages, and override the values of # global-flags From 569e804bd4065f5aa71e485a659d013b1450516c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 23 Feb 2015 19:40:43 +0200 Subject: [PATCH 185/233] Extra upper bound to work around silkapp/rest#107 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 123b4e8b..5ebf663d 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -758,6 +758,7 @@ packages: - rest-client < 0.5 - rest-types < 1.13 - rest-core < 0.35 + - rest-gen < 0.17 # Package flags are applied to individual packages, and override the values of # global-flags From 350c4402742f51c70270c5ede6ce1987e003933f Mon Sep 17 00:00:00 2001 From: Greg V Date: Mon, 23 Feb 2015 21:40:54 +0300 Subject: [PATCH 186/233] Add gitson, pcre-heavy --- build-constraints.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 5ebf663d..8eeb83e1 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -712,6 +712,10 @@ packages: "Timothy Jones git@zmthy.io @zmthy": - cabal-test-quickcheck - http-media + + "Greg V greg@unrelenting.technology @myfreeweb": + - gitson + - pcre-heavy "Stackage upper bounds": From 4b4331e349ae071324bbb0e095c4b2f8d4c54c54 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 24 Feb 2015 07:00:45 +0200 Subject: [PATCH 187/233] Add @Gabriel439 as maintainer of pipes-safe See: https://github.com/fpco/stackage/issues/443#issuecomment-75662205 --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 5ebf663d..ad7db534 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -379,6 +379,7 @@ packages: - pipes - pipes-parse - pipes-concurrency + - pipes-safe "Chris Allen ": - bloodhound From 4c1a2781173a1f8168a8a835974079888945225d Mon Sep 17 00:00:00 2001 From: Francesco Mazzoli Date: Tue, 24 Feb 2015 16:15:14 +0100 Subject: [PATCH 188/233] Add `language-c-quote` --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 6fd5222b..98bb6d7b 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -718,6 +718,9 @@ packages: - gitson - pcre-heavy + "Francesco Mazzoli f@mazzo.li @bitonic": + - language-c-quote + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From 4e1d67b34b787df988ec49d10ddd31589290bea7 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 25 Feb 2015 09:37:46 +0200 Subject: [PATCH 189/233] rest-wai upper bound --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 98bb6d7b..8aeabfae 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -767,6 +767,7 @@ packages: - rest-types < 1.13 - rest-core < 0.35 - rest-gen < 0.17 + - rest-wai < 0.1.0.7 # Package flags are applied to individual packages, and override the values of # global-flags From 859415519567caf0857a2d2954f11e67b7713114 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 26 Feb 2015 07:16:24 +0200 Subject: [PATCH 190/233] Add back gitlib-libgit2 (fixes jwiegley/gitlib#23) --- build-constraints.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8aeabfae..5feed0f1 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -578,6 +578,7 @@ packages: - haddock-api - here - hlibgit2 + - gitlib-libgit2 - hostname-validate - interpolatedstring-perl6 - iproute From 4af65f023229ef1e1584f57eec570d8c0214614c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Hahn?= Date: Fri, 27 Feb 2015 19:54:42 +0800 Subject: [PATCH 191/233] Add string-conversions --- build-constraints.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8aeabfae..9b52943c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -713,7 +713,7 @@ packages: "Timothy Jones git@zmthy.io @zmthy": - cabal-test-quickcheck - http-media - + "Greg V greg@unrelenting.technology @myfreeweb": - gitson - pcre-heavy @@ -721,6 +721,9 @@ packages: "Francesco Mazzoli f@mazzo.li @bitonic": - language-c-quote + "Sönke Hahn soenkehahn@gmail.com @soenkehahn": + - string-conversions + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From fbf40bcd2e5e622d4babf0093fcc1e641c7d2eec Mon Sep 17 00:00:00 2001 From: marcinmrotek Date: Sun, 1 Mar 2015 08:29:37 +0100 Subject: [PATCH 192/233] Update build-constraints.yaml Added my libraries: diagrams-hsqml, type-list and vinyl-utils. --- build-constraints.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 28735ce9..5aefd126 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -603,6 +603,11 @@ packages: "Samplecount stefan@samplecount.com @kaoskorobase": - shake-language-c + + "Marcin Mrotek ": + - diagrams-hsqml + - type-list + - vinyl-utils "Stackage upper bounds": # https://github.com/fpco/stackage/issues/288 From b5ac384b46ffd3adf82d0a0c196c82c433adc363 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 1 Mar 2015 12:10:47 +0200 Subject: [PATCH 193/233] Create symlink for nettle --- debian-bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 0f296009..7025ea05 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -64,5 +64,8 @@ cd nettle-2.7.1 ./configure --prefix=/usr make make install + +mkdir -p /usr/lib/x86_64-linux-gnu/ +ln -sfv /usr/lib/libnettle.so.4.7 /usr/lib/x86_64-linux-gnu/libnettle.so.4 ) rm -rf /tmp/nettle-build From dffc7edfba56a1bb7ce59c595f30e9a9687c4cdc Mon Sep 17 00:00:00 2001 From: Adam Bergmark Date: Sun, 1 Mar 2015 18:21:14 +0100 Subject: [PATCH 194/233] Add generic-xmlpickler and remove some duplicate entries --- build-constraints.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index fd5e83cd..e881afca 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -507,9 +507,9 @@ packages: - code-builder - fay-builder - generic-aeson + - generic-xmlpickler - hxt-pickle-utils - imagesize-conduit - - imagesize-conduit - json-schema - multipart - regular-xmlpickler @@ -522,8 +522,6 @@ packages: - rest-types - rest-wai - tostring - - tostring - - uri-encode - uri-encode "Simon Michael ": From a8a2bd77d34fa8c04c01b60d9dd345d1e41717b5 Mon Sep 17 00:00:00 2001 From: Dimitri 'phaazon' Sabadie Date: Tue, 3 Mar 2015 00:17:53 +0100 Subject: [PATCH 195/233] Added two packages for Dimitri Sabadie. - smoothie, a spline library ; - al, a raw binding to OpenAL 1.1. --- build-constraints.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e881afca..bdb537b7 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -531,7 +531,9 @@ packages: - io-manager "Dimitri Sabadie ": - ghc-syb-utils @@ -643,7 +645,7 @@ packages: "Samplecount stefan@samplecount.com @kaoskorobase": - shake-language-c - + "Marcin Mrotek ": - diagrams-hsqml - type-list From 3807e55a52378132616e585b74a5572211041310 Mon Sep 17 00:00:00 2001 From: Boris Date: Tue, 3 Mar 2015 09:46:02 +0200 Subject: [PATCH 196/233] remove upper bound for https://github.com/d12frosted/CanonicalPath/issues/3 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index bdb537b7..e0d1391c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -758,9 +758,6 @@ packages: # https://github.com/fpco/stackage/issues/426 - utf8-string < 1 - # https://github.com/d12frosted/CanonicalPath/issues/3 - - system-canonicalpath < 0.3 - # https://github.com/fpco/stackage/issues/440 - th-orphans < 0.9 - file-location < 0.4.7 From d9905369565891335dc3184d06e8bb421f7162c2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 3 Mar 2015 11:37:30 +0200 Subject: [PATCH 197/233] Temporarily disable al #461 --- build-constraints.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e0d1391c..b19729a9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -531,7 +531,8 @@ packages: - io-manager "Dimitri Sabadie Date: Tue, 3 Mar 2015 11:42:12 +0200 Subject: [PATCH 198/233] Expected test failure ndmitchell/hoogle#101 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index b19729a9..2fb473a9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1046,6 +1046,9 @@ expected-test-failures: # https://github.com/ekmett/semigroupoids/issues/18 - semigroupoids + # https://github.com/ndmitchell/hoogle/issues/101 + - hoogle + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 2dcff03780800b5a6f8a58ea97255a1d3581fa29 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 3 Mar 2015 17:08:06 +0200 Subject: [PATCH 199/233] Expected test failure d12frosted/CanonicalPath#4 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 2fb473a9..897ca989 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1049,6 +1049,9 @@ expected-test-failures: # https://github.com/ndmitchell/hoogle/issues/101 - hoogle + # https://github.com/d12frosted/CanonicalPath/issues/4 + - system-canonicalpath + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 8dc931e093c65c8a6ba9ba87fb15c8f9d08ff390 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 3 Mar 2015 17:10:43 +0200 Subject: [PATCH 200/233] Expected test failure myfreeweb/gitson#1 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 897ca989..d021ca68 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1052,6 +1052,9 @@ expected-test-failures: # https://github.com/d12frosted/CanonicalPath/issues/4 - system-canonicalpath + # https://github.com/myfreeweb/gitson/issues/1 + - gitson + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From a22919f9402f9eea407fc676919221106bd1e819 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 5 Mar 2015 09:59:02 +0200 Subject: [PATCH 201/233] Temporarily block hopenpgp-tools #463 --- build-constraints.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index d021ca68..3e6c210f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -477,7 +477,8 @@ packages: - openpgp-asciiarmor - MusicBrainz - DAV - - hopenpgp-tools + # https://github.com/fpco/stackage/issues/463 + #- hopenpgp-tools # https://github.com/fpco/stackage/issues/160 "Ketil Malde": From 0770ab8e27e62babba894c03ed5e4e5d33e55a93 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 5 Mar 2015 10:00:36 +0200 Subject: [PATCH 202/233] system-canonicalpath passes tests again --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3e6c210f..d0801ef5 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1050,9 +1050,6 @@ expected-test-failures: # https://github.com/ndmitchell/hoogle/issues/101 - hoogle - # https://github.com/d12frosted/CanonicalPath/issues/4 - - system-canonicalpath - # https://github.com/myfreeweb/gitson/issues/1 - gitson From a3120f0d0925a1373828ba88a715c995a4dd2caf Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 7 Mar 2015 19:09:59 +0200 Subject: [PATCH 203/233] Upper bound for #464 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index d0801ef5..3fbce4fd 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -777,6 +777,9 @@ packages: - rest-gen < 0.17 - rest-wai < 0.1.0.7 + # https://github.com/fpco/stackage/issues/464 + - profunctors < 4.4 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 6a492e8a68c64b8d6ae78c0e882396e48772efee Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 7 Mar 2015 19:10:52 +0200 Subject: [PATCH 204/233] Upper bound for #465 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3fbce4fd..c93239e9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -780,6 +780,9 @@ packages: # https://github.com/fpco/stackage/issues/464 - profunctors < 4.4 + # https://github.com/fpco/stackage/issues/465 + - free < 4.11 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 1e004c73e4421328f5178f23fbd14d8af45ae4be Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sat, 7 Mar 2015 19:11:40 +0200 Subject: [PATCH 205/233] Upper bound for #466 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index c93239e9..01ec535e 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -783,6 +783,9 @@ packages: # https://github.com/fpco/stackage/issues/465 - free < 4.11 + # https://github.com/fpco/stackage/issues/466 + - linear < 1.17 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From a923f36160bf0ab0b4a925da1d79bcfeaa7d6833 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 8 Mar 2015 06:31:50 +0200 Subject: [PATCH 206/233] Upper bounds for #467 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 01ec535e..0221448c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -786,6 +786,9 @@ packages: # https://github.com/fpco/stackage/issues/466 - linear < 1.17 + # https://github.com/fpco/stackage/issues/467 + - lens < 4.8 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 0fd3665aea7914aaf3168978580e1f0f1a79ee81 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 8 Mar 2015 06:33:53 +0200 Subject: [PATCH 207/233] Expected test failure jcristovao/enclosed-exceptions#6 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0221448c..34e66411 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1065,6 +1065,9 @@ expected-test-failures: # https://github.com/myfreeweb/gitson/issues/1 - gitson + # https://github.com/jcristovao/enclosed-exceptions/issues/6 + - enclosed-exceptions + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From 661ff0199932a015a7fa1d64c4f5b7b82ced9683 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 8 Mar 2015 06:42:48 +0200 Subject: [PATCH 208/233] Remove upper bounds and close #466 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 34e66411..e468214c 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -783,9 +783,6 @@ packages: # https://github.com/fpco/stackage/issues/465 - free < 4.11 - # https://github.com/fpco/stackage/issues/466 - - linear < 1.17 - # https://github.com/fpco/stackage/issues/467 - lens < 4.8 From 7a10048b01e4e9ed712e3586a18eae37972cbec5 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 8 Mar 2015 06:43:12 +0200 Subject: [PATCH 209/233] Remove upper bounds and close #465 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index e468214c..2821a495 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -780,9 +780,6 @@ packages: # https://github.com/fpco/stackage/issues/464 - profunctors < 4.4 - # https://github.com/fpco/stackage/issues/465 - - free < 4.11 - # https://github.com/fpco/stackage/issues/467 - lens < 4.8 From 2495abb79e69126bbf13bf1e757a953d56c5a07a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 8 Mar 2015 06:43:36 +0200 Subject: [PATCH 210/233] Remove upper bounds and close #464 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 2821a495..0684d999 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -777,9 +777,6 @@ packages: - rest-gen < 0.17 - rest-wai < 0.1.0.7 - # https://github.com/fpco/stackage/issues/464 - - profunctors < 4.4 - # https://github.com/fpco/stackage/issues/467 - lens < 4.8 From aab7687816fd5aed4284425e95fb0d508ba8f4fb Mon Sep 17 00:00:00 2001 From: Alexander Thiemann Date: Sun, 8 Mar 2015 20:33:54 +0100 Subject: [PATCH 211/233] add users, users-test, users-postgresql-simple --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 0684d999..8e143411 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -619,6 +619,9 @@ packages: - Spock - Spock-digestive - Spock-worker + - users + - users-test + - users-postgresql-simple "Joey Eremondi ": - aeson-pretty From ac07851dac4f836f70f234266b7eff5322d08dfc Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 10 Mar 2015 08:56:53 +0200 Subject: [PATCH 212/233] Expected test failure for users-postgresql-simple --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 8e143411..95e3a681 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1062,6 +1062,9 @@ expected-test-failures: # https://github.com/jcristovao/enclosed-exceptions/issues/6 - enclosed-exceptions + # Expects a running PostgreSQL server + - users-postgresql-simple + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From b096a8b49bd9d65c0107c94fc8b06a0b65fc4772 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 10 Mar 2015 08:59:25 +0200 Subject: [PATCH 213/233] Upper bound for #469 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 95e3a681..08a6de13 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -783,6 +783,9 @@ packages: # https://github.com/fpco/stackage/issues/467 - lens < 4.8 + # https://github.com/fpco/stackage/issues/469 + - contravariant < 1.3 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 7f68c4aa0d057d3480e51f6f03b390043d2c4669 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 10 Mar 2015 21:39:30 +0200 Subject: [PATCH 214/233] Remove upper bounds and close #469 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 08a6de13..95e3a681 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -783,9 +783,6 @@ packages: # https://github.com/fpco/stackage/issues/467 - lens < 4.8 - # https://github.com/fpco/stackage/issues/469 - - contravariant < 1.3 - # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 508fefe6186d346ac509c8189801a9acb8ab02bc Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Mar 2015 07:27:48 +0200 Subject: [PATCH 215/233] Remove upper bounds and close #291 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 95e3a681..55c7d7b7 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -740,9 +740,6 @@ packages: # Force a specific version that's compatible with transformers 0.3 - transformers-compat == 0.4.0.3 - # https://github.com/fpco/stackage/issues/291 - - random < 1.0.1.3 - # https://github.com/fpco/stackage/issues/390 # NOTE: When this issue is resolved, remove the expected test failure # for language-ecmascript as well. From 4b9c9e1c68f14328d580c21f29dc208ac8e70484 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Mar 2015 07:36:22 +0200 Subject: [PATCH 216/233] Get a missing executable for lhs2tex --- debian-bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 7025ea05..827e8460 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -20,7 +20,7 @@ apt-get install -y \ git \ wget \ m4 \ - texlive-binaries \ + texlive-full \ libgmp3c2 \ libgmp3-dev \ zlib1g-dev \ From 6443a042194fd3509088b103e8466360e36a9bb1 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Wed, 11 Mar 2015 14:41:42 +0200 Subject: [PATCH 217/233] Add waitra package --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 55c7d7b7..d8e951d8 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -735,6 +735,9 @@ packages: "Sönke Hahn soenkehahn@gmail.com @soenkehahn": - string-conversions + "Oleg Grenrus oleg.grenrus@iki.fi @phadej": + - waitra + "Stackage upper bounds": # Force a specific version that's compatible with transformers 0.3 From d0f8ae6e34310e928292445b0a7e49925dc0bda4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Mar 2015 14:49:27 +0200 Subject: [PATCH 218/233] Expect nettle test failure --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 55c7d7b7..e3ee8c09 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1062,6 +1062,9 @@ expected-test-failures: # Expects a running PostgreSQL server - users-postgresql-simple + # Problems with linking with system libraries on Ubuntu 12.04 + - nettle + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From ba470b136b97f4255983a14c5f1fb7c4bb297c41 Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Wed, 11 Mar 2015 09:50:57 -1000 Subject: [PATCH 219/233] Install alex & happy via PPA onto the docker image as a binary deb package Might be acceptable for #471 in the short term --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a83c42bc..c3956908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,9 @@ ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh RUN DEBIAN_FRONTEND=noninteractive bash /tmp/debian-bootstrap.sh RUN rm /tmp/debian-bootstrap.sh -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install-1.20 ghc-7.8.4 +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install-1.20 ghc-7.8.4 alex-3.1.3 happy-1.19.4 -ENV PATH /home/stackage/.cabal/bin:/usr/local/sbin:/usr/local/bin:/opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH /home/stackage/.cabal/bin:/usr/local/sbin:/usr/local/bin:/opt/ghc/7.8.4/bin:/opt/cabal/1.20/bin:/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN cabal update ADD . /tmp/stackage From 79ccb289bdde569f4ec148ae0f1b5781ab99be43 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 11 Mar 2015 22:11:32 +0200 Subject: [PATCH 220/233] Upper bound for #473 --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index ef9b0fd4..3829e62f 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -783,6 +783,9 @@ packages: # https://github.com/fpco/stackage/issues/467 - lens < 4.8 + # https://github.com/fpco/stackage/issues/473 + - snap < 0.14 + # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 3ef123f4b4ecf642c15f99264358c99aa92c35ae Mon Sep 17 00:00:00 2001 From: Leon Mergen Date: Thu, 12 Mar 2015 12:05:20 +0700 Subject: [PATCH 221/233] Adds network-anonymous-i2p --- build-constraints.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index 3829e62f..bbd379d9 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -718,8 +718,9 @@ packages: "Gabríel Arthúr Pétursson gabriel@system.is": - sdl2 - "Leon Mergen leon@solatis.com": + "Leon Mergen leon@solatis.com @solatis": - network-attoparsec + - network-anonymous-i2p "Timothy Jones git@zmthy.io @zmthy": - cabal-test-quickcheck From a30a4297744681087bdeb55f24d15e93827d1d6a Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 08:12:35 +0200 Subject: [PATCH 222/233] Remove upper bounds and close #473 --- build-constraints.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/build-constraints.yaml b/build-constraints.yaml index bbd379d9..7655b963 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -784,9 +784,6 @@ packages: # https://github.com/fpco/stackage/issues/467 - lens < 4.8 - # https://github.com/fpco/stackage/issues/473 - - snap < 0.14 - # Package flags are applied to individual packages, and override the values of # global-flags package-flags: From 4b651e8865fe4ee9e551fc6b35582d33d01cfa42 Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Wed, 11 Mar 2015 14:34:53 -1000 Subject: [PATCH 223/233] add performbuild flag for dynamic executables --- Stackage/CompleteBuild.hs | 1 + Stackage/InstallBuild.hs | 1 + Stackage/PerformBuild.hs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 341be2b4..62a7634e 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -206,6 +206,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild , pbEnableTests = bfEnableTests buildFlags , pbEnableHaddock = bfEnableHaddock buildFlags , pbEnableLibProfiling = bfEnableLibProfile buildFlags + , pbEnableExecDyn = bfEnableExecDyn buildFlags , pbVerbose = bfVerbose buildFlags , pbAllowNewer = bfSkipCheck buildFlags } diff --git a/Stackage/InstallBuild.hs b/Stackage/InstallBuild.hs index a6a6c25f..74c78427 100644 --- a/Stackage/InstallBuild.hs +++ b/Stackage/InstallBuild.hs @@ -51,6 +51,7 @@ getPerformBuild plan InstallFlags{..} = , pbEnableTests = ifEnableTests , pbEnableHaddock = ifEnableHaddock , pbEnableLibProfiling = ifEnableLibProfiling + , pbEnableExecDyn = ifEnableExecDyn , pbVerbose = ifVerbose , pbAllowNewer = ifSkipCheck } diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index e38f8e62..e25094c6 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -64,6 +64,7 @@ data PerformBuild = PerformBuild , pbEnableTests :: Bool , pbEnableHaddock :: Bool , pbEnableLibProfiling :: Bool + , pbEnableExecDyn :: Bool , pbVerbose :: Bool , pbAllowNewer :: Bool -- ^ Pass --allow-newer to cabal configure @@ -317,6 +318,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = tell' $ "--flags=" ++ flags when (pbEnableLibProfiling && pcEnableLibProfile) $ tell' "--enable-library-profiling" + when pbEnableExecDyn $ tell' "--enable-executable-dynamic" where tell' x = tell (x:) From f6b95190f1f7420071e2dedc48ad9bc7cf32f31f Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Wed, 11 Mar 2015 14:34:22 -1000 Subject: [PATCH 224/233] add installflag for dynamic executables --- Stackage/InstallBuild.hs | 1 + app/stackage.hs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Stackage/InstallBuild.hs b/Stackage/InstallBuild.hs index 74c78427..757939a7 100644 --- a/Stackage/InstallBuild.hs +++ b/Stackage/InstallBuild.hs @@ -30,6 +30,7 @@ data InstallFlags = InstallFlags , ifEnableTests :: !Bool , ifEnableHaddock :: !Bool , ifEnableLibProfiling :: !Bool + , ifEnableExecDyn :: !Bool , ifVerbose :: !Bool , ifSkipCheck :: !Bool } deriving (Show) diff --git a/app/stackage.hs b/app/stackage.hs index c8bb4f52..57497dfd 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -149,6 +149,9 @@ main = switch (long "enable-library-profiling" <> help "Enable profiling when building") <*> + switch + (long "enable-executable-dynamic" <> + help "Enable dynamic executables when building") <*> switch (long "verbose" <> short 'v' <> help "Output verbose detail about the build steps") <*> From 0ffdb203c3d340e2423b9d08b123491b94ef6225 Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Wed, 11 Mar 2015 14:33:14 -1000 Subject: [PATCH 225/233] add buildflags for dynamic executables --- Stackage/CompleteBuild.hs | 1 + app/stackage.hs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 62a7634e..ab9c3a3b 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -36,6 +36,7 @@ data BuildFlags = BuildFlags , bfEnableHaddock :: !Bool , bfDoUpload :: !Bool , bfEnableLibProfile :: !Bool + , bfEnableExecDyn :: !Bool , bfVerbose :: !Bool , bfSkipCheck :: !Bool } deriving (Show) diff --git a/app/stackage.hs b/app/stackage.hs index 57497dfd..1b9583c7 100644 --- a/app/stackage.hs +++ b/app/stackage.hs @@ -90,6 +90,9 @@ main = switch (long "enable-library-profiling" <> help "Enable profiling when building") <*> + switch + (long "enable-executable-dynamic" <> + help "Enable dynamic executables when building") <*> switch (long "verbose" <> short 'v' <> help "Output verbose detail about the build steps") <*> From eadca478ae0e3161308c64e0cc63e342ad3d303d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 14:26:16 +0200 Subject: [PATCH 226/233] First stab an incremental builds Pinging @chrisdone --- Stackage/CompleteBuild.hs | 4 +- Stackage/GhcPkg.hs | 79 ++++++++++++++++++++++ Stackage/PerformBuild.hs | 137 +++++++++++++++++++++++++++++++------- stackage.cabal | 2 + 4 files changed, 195 insertions(+), 27 deletions(-) create mode 100644 Stackage/GhcPkg.hs diff --git a/Stackage/CompleteBuild.hs b/Stackage/CompleteBuild.hs index 341be2b4..97e8ba72 100644 --- a/Stackage/CompleteBuild.hs +++ b/Stackage/CompleteBuild.hs @@ -67,7 +67,7 @@ nightlySettings :: Text -- ^ day -> Settings nightlySettings day plan' = Settings { planFile = nightlyPlanFile day - , buildDir = fpFromText $ "builds/stackage-nightly-" ++ day + , buildDir = fpFromText $ "builds/nightly" , logDir = fpFromText $ "logs/stackage-nightly-" ++ day , title = \ghcVer -> concat [ "Stackage Nightly " @@ -120,7 +120,7 @@ getSettings man (LTS bumpType) = do return Settings { planFile = newfile - , buildDir = fpFromText $ "builds/stackage-lts-" ++ tshow new + , buildDir = fpFromText $ "builds/lts" , logDir = fpFromText $ "logs/stackage-lts-" ++ tshow new , title = \ghcVer -> concat [ "LTS Haskell " diff --git a/Stackage/GhcPkg.hs b/Stackage/GhcPkg.hs new file mode 100644 index 00000000..4985d2f2 --- /dev/null +++ b/Stackage/GhcPkg.hs @@ -0,0 +1,79 @@ +{-# LANGUAGE NoImplicitPrelude #-} +-- | General commands related to ghc-pkg. + +module Stackage.GhcPkg where + +import Data.Conduit +import qualified Data.Conduit.List as CL +import Data.Conduit.Process +import qualified Data.Conduit.Text as CT +import Data.Maybe +import Data.Text (Text) +import qualified Data.Text as T +import Distribution.Compat.ReadP +import Distribution.Package +import Distribution.Text (parse) +import Filesystem.Path.CurrentOS (FilePath) +import qualified Filesystem.Path.CurrentOS as FP +import Data.Map (Map) +import Data.Version (Version) +import Stackage.Prelude + +setupPackageDatabase + :: Maybe FilePath -- ^ database location, Nothing if using global DB + -> Map PackageName Version -- ^ packages and versions to be installed + -> IO (Set PackageName) -- ^ packages remaining in the database after cleanup +setupPackageDatabase mdb toInstall = do + registered1 <- getRegisteredPackages flags + forM_ registered1 $ \(PackageIdentifier name version) -> + case lookup name toInstall of + Just version' | version /= version' -> unregisterPackage flags name + _ -> return () + broken <- getBrokenPackages flags + forM_ broken $ \(PackageIdentifier name _) -> unregisterPackage flags name + foldMap (\(PackageIdentifier name _) -> singletonSet name) + <$> getRegisteredPackages flags + where + flags = ghcPkgFlags mdb + +ghcPkgFlags :: Maybe FilePath -> [String] +ghcPkgFlags mdb = + "--no-user-package-db" : + case mdb of + Nothing -> ["--global"] + Just fp -> ["--package-db=" ++ fpToString fp] + +-- | Get broken packages. +getBrokenPackages :: [String] -> IO [PackageIdentifier] +getBrokenPackages flags = do + (_,ps) <- sourceProcessWithConsumer + (proc + "ghc-pkg" + ("check" : "--simple-output" : flags)) + (CT.decodeUtf8 $= CT.lines $= CL.consume) + return (mapMaybe parsePackageIdent (T.words (T.unlines ps))) + +-- | Get available packages. +getRegisteredPackages :: [String] -> IO [PackageIdentifier] +getRegisteredPackages flags = do + (_,ps) <- sourceProcessWithConsumer + (proc + "ghc-pkg" + ("list" : "--simple-output" : flags)) + (CT.decodeUtf8 $= CT.lines $= CL.consume) + return (mapMaybe parsePackageIdent (T.words (T.unlines ps))) + +-- | Parse a package identifier: foo-1.2.3 +parsePackageIdent :: Text -> Maybe PackageIdentifier +parsePackageIdent = fmap fst . + listToMaybe . + filter (null . snd) . + readP_to_S parse . T.unpack + +-- | Unregister a package. +unregisterPackage :: [String] -> PackageName -> IO () +unregisterPackage flags ident = do + void (readProcessWithExitCode + "ghc-pkg" + ("unregister": flags ++ ["--force", unpack $ display ident]) + "") diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index e38f8e62..fe8dac4a 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -19,11 +19,12 @@ import qualified Data.Map as Map import Data.NonNull (fromNullable) import Filesystem (canonicalizePath, createTree, getWorkingDirectory, isDirectory, - removeTree, rename) + removeTree, rename, isFile, removeFile) import Filesystem.Path (parent) import qualified Filesystem.Path as F import Stackage.BuildConstraints import Stackage.BuildPlan +import Stackage.GhcPkg import Stackage.PackageDescription import Stackage.Prelude hiding (pi) import System.Directory (findExecutable) @@ -134,6 +135,10 @@ pbLibDir pb = pbInstallDest pb "lib" pbDataDir pb = pbInstallDest pb "share" pbDocDir pb = pbInstallDest pb "doc" +-- | Directory keeping previous result info +pbPrevResDir :: PerformBuild -> FilePath +pbPrevResDir pb = pbInstallDest pb "prevres" + performBuild :: PerformBuild -> IO [Text] performBuild pb = do cwd <- getWorkingDirectory @@ -161,12 +166,13 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do $ \ClosedStream Inherited Inherited -> return () let removeTree' fp = whenM (isDirectory fp) (removeTree fp) - mapM_ removeTree' [pbInstallDest, pbLogDir] + removeTree' pbLogDir - forM_ (pbDatabase pb) $ \db -> do - createTree $ parent db - withCheckedProcess (proc "ghc-pkg" ["init", fpToString db]) - $ \ClosedStream Inherited Inherited -> return () + forM_ (pbDatabase pb) $ \db -> + unlessM (isFile $ db "package.cache") $ do + createTree $ parent db + withCheckedProcess (proc "ghc-pkg" ["init", fpToString db]) + $ \ClosedStream Inherited Inherited -> return () pbLog $ encodeUtf8 "Copying built-in Haddocks\n" copyBuiltInHaddocks (pbDocDir pb) @@ -186,7 +192,12 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do env <- getEnvironment haddockFiles <- newTVarIO mempty - forM_ packageMap $ \pi -> void $ async $ singleBuild pb SingleBuild + registeredPackages <- setupPackageDatabase + (pbDatabase pb) + (ppVersion <$> bpPackages pbPlan) + + forM_ packageMap $ \pi -> void $ async $ singleBuild pb registeredPackages + SingleBuild { sbSem = sem , sbErrsVar = errsVar , sbWarningsVar = warningsVar @@ -248,8 +259,10 @@ data SingleBuild = SingleBuild , sbHaddockFiles :: TVar (Map Text FilePath) -- ^ package-version, .haddock file } -singleBuild :: PerformBuild -> SingleBuild -> IO () -singleBuild pb@PerformBuild {..} SingleBuild {..} = +singleBuild :: PerformBuild + -> Set PackageName -- ^ registered packages + -> SingleBuild -> IO () +singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = withCounter sbActive $ handle updateErrs $ (`finally` void (atomically $ tryPutTMVar (piResult sbPackageInfo) False)) @@ -261,11 +274,12 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = let wfd comps = waitForDeps sbToolMap sbPackageMap comps pbPlan sbPackageInfo . withTSem sbSem - wfd libComps buildLibrary + withUnpacked <- wfd libComps buildLibrary - wfd testComps runTests + wfd testComps (runTests withUnpacked) - name = display $ piName sbPackageInfo + pname = piName sbPackageInfo + name = display pname namever = concat [ name , "-" @@ -333,19 +347,34 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = buildLibrary = wf libOut $ \outH -> do let run a b = do when pbVerbose $ log' (unwords (a : b)) runChild outH a b - log' $ "Unpacking " ++ namever - runParent outH "cabal" ["unpack", namever] - log' $ "Configuring " ++ namever - run "cabal" $ "configure" : configArgs + isUnpacked <- newIORef False + let withUnpacked inner = do + unlessM (readIORef isUnpacked) $ do + log' $ "Unpacking " ++ namever + runParent outH "cabal" ["unpack", namever] + writeIORef isUnpacked True + inner - log' $ "Building " ++ namever - run "cabal" ["build"] + isConfiged <- newIORef False + let withConfiged inner = withUnpacked $ do + unlessM (readIORef isConfiged) $ do + log' $ "Configuring " ++ namever + run "cabal" $ "configure" : configArgs + writeIORef isConfiged True + inner - log' $ "Copying/registering " ++ namever - run "cabal" ["copy"] - withMVar sbRegisterMutex $ const $ - run "cabal" ["register"] + unless (pname `member` registeredPackages) $ withConfiged $ do + deletePreviousResults pb pname + -- FIXME delete old Haddocks? + + log' $ "Building " ++ namever + run "cabal" ["build"] + + log' $ "Copying/registering " ++ namever + run "cabal" ["copy"] + withMVar sbRegisterMutex $ const $ + run "cabal" ["register"] -- Even if the tests later fail, we can allow other libraries to build -- on top of our successful results @@ -355,7 +384,11 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = -- dependency's haddocks before this finishes atomically $ putTMVar (piResult sbPackageInfo) True - when (pbEnableHaddock && pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do + prevHaddockResult <- getPreviousResult pb Haddock pname + let needHaddock = pbEnableHaddock + && checkPrevResult prevHaddockResult pcHaddocks + && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo) + when needHaddock $ withConfiged $ do log' $ "Haddocks " ++ namever hfs <- readTVarIO sbHaddockFiles let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat @@ -390,15 +423,21 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = $ modifyTVar sbHaddockFiles $ insertMap namever newPath + savePreviousResult pb Haddock pname $ either (const False) (const True) eres case (eres, pcHaddocks) of (Left e, ExpectSuccess) -> throwM e (Right (), ExpectFailure) -> warn $ namever ++ ": unexpected Haddock success" _ -> return () - runTests = wf testOut $ \outH -> do + return withUnpacked + + runTests withUnpacked = wf testOut $ \outH -> do let run = runChild outH - when (pbEnableTests && pcTests /= Don'tBuild) $ do + prevTestResult <- getPreviousResult pb Test pname + let needTest = pbEnableTests + && checkPrevResult prevTestResult pcTests + when needTest $ withUnpacked $ do log' $ "Test configure " ++ namever run "cabal" $ "configure" : "--enable-tests" : configArgs @@ -409,6 +448,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} = log' $ "Test run " ++ namever run "cabal" ["test", "--log=" ++ fpToText testRunOut] + savePreviousResult pb Test pname $ either (const False) (const True) eres case (eres, pcTests) of (Left e, ExpectSuccess) -> throwM e (Right (), ExpectFailure) -> warn $ namever ++ ": unexpected test success" @@ -451,3 +491,50 @@ copyBuiltInHaddocks docdir = do src <- canonicalizePath (parent (fpFromString ghc) "../share/doc/ghc/html/libraries") copyDir src docdir + +------------- Previous results + +-- | The previous actions that can be run +data ResultType = Haddock | Test + deriving (Show, Enum, Eq, Ord, Bounded, Read) + +-- | The result generated on a previous run +data PrevResult = PRNoResult | PRSuccess | PRFailure + +-- | Check if we should rerun based on a PrevResult and the expected status +checkPrevResult _ Don'tBuild = False +checkPrevResult PRNoResult _ = True +checkPrevResult PRSuccess _ = False +checkPrevResult PRFailure ExpectSuccess = True +checkPrevResult PRFailure _ = False + +withPRPath :: PerformBuild -> ResultType -> PackageName -> (FilePath -> IO a) -> IO a +withPRPath pb rt (PackageName name) inner = do + createTree $ parent fp + inner fp + where + fp = pbPrevResDir pb fpFromString (show rt) fpFromString name + +successBS, failureBS :: ByteString +successBS = "success" +failureBS = "failure" + +getPreviousResult :: PerformBuild -> ResultType -> PackageName -> IO PrevResult +getPreviousResult w x y = withPRPath w x y $ \fp -> do + eres <- tryIO $ readFile fp + return $ case eres of + Right bs + | bs == successBS -> PRSuccess + | bs == failureBS -> PRFailure + _ -> PRNoResult + +savePreviousResult :: PerformBuild -> ResultType -> PackageName -> Bool -> IO () +savePreviousResult pb rt name res = + withPRPath pb rt name $ \fp -> writeFile fp $ + if res then successBS else failureBS + +deletePreviousResults :: PerformBuild -> PackageName -> IO () +deletePreviousResults pb name = + forM_ [minBound..maxBound] $ \rt -> + withPRPath pb rt name $ \fp -> + void $ tryIO $ removeFile fp diff --git a/stackage.cabal b/stackage.cabal index 94b42da9..2dec3030 100644 --- a/stackage.cabal +++ b/stackage.cabal @@ -23,6 +23,7 @@ library Stackage.BuildPlan Stackage.CheckBuildPlan Stackage.UpdateBuildPlan + Stackage.GhcPkg Stackage.GithubPings Stackage.InstallBuild Stackage.PackageDescription @@ -63,6 +64,7 @@ library , streaming-commons >= 0.1.7.1 , semigroups , xml-conduit + , conduit executable stackage default-language: Haskell2010 From f5bd0c777d99734bbb69b54bf98aeaff69eb8fee Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 16:59:57 +0200 Subject: [PATCH 227/233] Add expected test failure network-anonymous-i2p --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 7655b963..1b343254 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1069,6 +1069,9 @@ expected-test-failures: # Problems with linking with system libraries on Ubuntu 12.04 - nettle + # Requires locally running services + - network-anonymous-i2p + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4 From e75b014b8b207330cd5d487010bf72daafc95e4e Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 17:00:56 +0200 Subject: [PATCH 228/233] Delete old Haddocks when unregistering --- Stackage/GhcPkg.hs | 19 ++++++++++++------- Stackage/PerformBuild.hs | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Stackage/GhcPkg.hs b/Stackage/GhcPkg.hs index 4985d2f2..c741e96a 100644 --- a/Stackage/GhcPkg.hs +++ b/Stackage/GhcPkg.hs @@ -18,19 +18,21 @@ import qualified Filesystem.Path.CurrentOS as FP import Data.Map (Map) import Data.Version (Version) import Stackage.Prelude +import Filesystem (removeTree) setupPackageDatabase :: Maybe FilePath -- ^ database location, Nothing if using global DB + -> FilePath -- ^ documentation root -> Map PackageName Version -- ^ packages and versions to be installed -> IO (Set PackageName) -- ^ packages remaining in the database after cleanup -setupPackageDatabase mdb toInstall = do +setupPackageDatabase mdb docDir toInstall = do registered1 <- getRegisteredPackages flags - forM_ registered1 $ \(PackageIdentifier name version) -> + forM_ registered1 $ \pi@(PackageIdentifier name version) -> case lookup name toInstall of - Just version' | version /= version' -> unregisterPackage flags name + Just version' | version /= version' -> unregisterPackage docDir flags pi _ -> return () broken <- getBrokenPackages flags - forM_ broken $ \(PackageIdentifier name _) -> unregisterPackage flags name + forM_ broken $ unregisterPackage docDir flags foldMap (\(PackageIdentifier name _) -> singletonSet name) <$> getRegisteredPackages flags where @@ -71,9 +73,12 @@ parsePackageIdent = fmap fst . readP_to_S parse . T.unpack -- | Unregister a package. -unregisterPackage :: [String] -> PackageName -> IO () -unregisterPackage flags ident = do +unregisterPackage :: FilePath -- ^ doc directory + -> [String] -> PackageIdentifier -> IO () +unregisterPackage docDir flags ident@(PackageIdentifier name _) = do void (readProcessWithExitCode "ghc-pkg" - ("unregister": flags ++ ["--force", unpack $ display ident]) + ("unregister": flags ++ ["--force", unpack $ display name]) "") + + void $ tryIO $ removeTree $ docDir fpFromText (display ident) diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index fe8dac4a..5597cd63 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -194,6 +194,7 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do registeredPackages <- setupPackageDatabase (pbDatabase pb) + (pbDocDir pb) (ppVersion <$> bpPackages pbPlan) forM_ packageMap $ \pi -> void $ async $ singleBuild pb registeredPackages @@ -366,7 +367,6 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = unless (pname `member` registeredPackages) $ withConfiged $ do deletePreviousResults pb pname - -- FIXME delete old Haddocks? log' $ "Building " ++ namever run "cabal" ["build"] From 75faf6126bfb566efe5e837c571c2b7a295504ab Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 17:57:43 +0200 Subject: [PATCH 229/233] Add logging when unregistering a package --- Stackage/GhcPkg.hs | 18 ++++++++++++------ Stackage/PerformBuild.hs | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Stackage/GhcPkg.hs b/Stackage/GhcPkg.hs index c741e96a..f6c3eccf 100644 --- a/Stackage/GhcPkg.hs +++ b/Stackage/GhcPkg.hs @@ -1,7 +1,10 @@ {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} -- | General commands related to ghc-pkg. -module Stackage.GhcPkg where +module Stackage.GhcPkg + ( setupPackageDatabase + ) where import Data.Conduit import qualified Data.Conduit.List as CL @@ -23,16 +26,17 @@ import Filesystem (removeTree) setupPackageDatabase :: Maybe FilePath -- ^ database location, Nothing if using global DB -> FilePath -- ^ documentation root + -> (ByteString -> IO ()) -- ^ logging -> Map PackageName Version -- ^ packages and versions to be installed -> IO (Set PackageName) -- ^ packages remaining in the database after cleanup -setupPackageDatabase mdb docDir toInstall = do +setupPackageDatabase mdb docDir log' toInstall = do registered1 <- getRegisteredPackages flags forM_ registered1 $ \pi@(PackageIdentifier name version) -> case lookup name toInstall of - Just version' | version /= version' -> unregisterPackage docDir flags pi + Just version' | version /= version' -> unregisterPackage log' docDir flags pi _ -> return () broken <- getBrokenPackages flags - forM_ broken $ unregisterPackage docDir flags + forM_ broken $ unregisterPackage log' docDir flags foldMap (\(PackageIdentifier name _) -> singletonSet name) <$> getRegisteredPackages flags where @@ -73,9 +77,11 @@ parsePackageIdent = fmap fst . readP_to_S parse . T.unpack -- | Unregister a package. -unregisterPackage :: FilePath -- ^ doc directory +unregisterPackage :: (ByteString -> IO ()) -- ^ log func + -> FilePath -- ^ doc directory -> [String] -> PackageIdentifier -> IO () -unregisterPackage docDir flags ident@(PackageIdentifier name _) = do +unregisterPackage log' docDir flags ident@(PackageIdentifier name _) = do + log' $ "Unregistering " ++ encodeUtf8 (display ident) void (readProcessWithExitCode "ghc-pkg" ("unregister": flags ++ ["--force", unpack $ display name]) diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 5597cd63..7a627a55 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -195,6 +195,7 @@ performBuild' pb@PerformBuild {..} = withBuildDir $ \builddir -> do registeredPackages <- setupPackageDatabase (pbDatabase pb) (pbDocDir pb) + pbLog (ppVersion <$> bpPackages pbPlan) forM_ packageMap $ \pi -> void $ async $ singleBuild pb registeredPackages From 351c03b8812f291f5625d3f8b6d5b096a44a7fe9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Mar 2015 08:39:50 +0200 Subject: [PATCH 230/233] Use PackageIdentifier --- Stackage/GhcPkg.hs | 2 +- Stackage/PerformBuild.hs | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Stackage/GhcPkg.hs b/Stackage/GhcPkg.hs index f6c3eccf..1e5171d8 100644 --- a/Stackage/GhcPkg.hs +++ b/Stackage/GhcPkg.hs @@ -81,7 +81,7 @@ unregisterPackage :: (ByteString -> IO ()) -- ^ log func -> FilePath -- ^ doc directory -> [String] -> PackageIdentifier -> IO () unregisterPackage log' docDir flags ident@(PackageIdentifier name _) = do - log' $ "Unregistering " ++ encodeUtf8 (display ident) + log' $ "Unregistering " ++ encodeUtf8 (display ident) ++ "\n" void (readProcessWithExitCode "ghc-pkg" ("unregister": flags ++ ["--force", unpack $ display name]) diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index 7a627a55..e43d0d5a 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -281,6 +281,7 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = wfd testComps (runTests withUnpacked) pname = piName sbPackageInfo + pident = PackageIdentifier pname (ppVersion $ piPlan sbPackageInfo) name = display pname namever = concat [ name @@ -385,7 +386,7 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = -- dependency's haddocks before this finishes atomically $ putTMVar (piResult sbPackageInfo) True - prevHaddockResult <- getPreviousResult pb Haddock pname + prevHaddockResult <- getPreviousResult pb Haddock pident let needHaddock = pbEnableHaddock && checkPrevResult prevHaddockResult pcHaddocks && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo) @@ -424,7 +425,7 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = $ modifyTVar sbHaddockFiles $ insertMap namever newPath - savePreviousResult pb Haddock pname $ either (const False) (const True) eres + savePreviousResult pb Haddock pident $ either (const False) (const True) eres case (eres, pcHaddocks) of (Left e, ExpectSuccess) -> throwM e (Right (), ExpectFailure) -> warn $ namever ++ ": unexpected Haddock success" @@ -435,7 +436,7 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = runTests withUnpacked = wf testOut $ \outH -> do let run = runChild outH - prevTestResult <- getPreviousResult pb Test pname + prevTestResult <- getPreviousResult pb Test pident let needTest = pbEnableTests && checkPrevResult prevTestResult pcTests when needTest $ withUnpacked $ do @@ -449,7 +450,7 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = log' $ "Test run " ++ namever run "cabal" ["test", "--log=" ++ fpToText testRunOut] - savePreviousResult pb Test pname $ either (const False) (const True) eres + savePreviousResult pb Test pident $ either (const False) (const True) eres case (eres, pcTests) of (Left e, ExpectSuccess) -> throwM e (Right (), ExpectFailure) -> warn $ namever ++ ": unexpected test success" @@ -501,26 +502,28 @@ data ResultType = Haddock | Test -- | The result generated on a previous run data PrevResult = PRNoResult | PRSuccess | PRFailure + deriving (Show, Enum, Eq, Ord, Bounded, Read) -- | Check if we should rerun based on a PrevResult and the expected status +checkPrevResult :: PrevResult -> TestState -> Bool checkPrevResult _ Don'tBuild = False checkPrevResult PRNoResult _ = True checkPrevResult PRSuccess _ = False checkPrevResult PRFailure ExpectSuccess = True checkPrevResult PRFailure _ = False -withPRPath :: PerformBuild -> ResultType -> PackageName -> (FilePath -> IO a) -> IO a -withPRPath pb rt (PackageName name) inner = do +withPRPath :: PerformBuild -> ResultType -> PackageIdentifier -> (FilePath -> IO a) -> IO a +withPRPath pb rt ident inner = do createTree $ parent fp inner fp where - fp = pbPrevResDir pb fpFromString (show rt) fpFromString name + fp = pbPrevResDir pb fpFromString (show rt) fpFromText (display ident) successBS, failureBS :: ByteString successBS = "success" failureBS = "failure" -getPreviousResult :: PerformBuild -> ResultType -> PackageName -> IO PrevResult +getPreviousResult :: PerformBuild -> ResultType -> PackageIdentifier -> IO PrevResult getPreviousResult w x y = withPRPath w x y $ \fp -> do eres <- tryIO $ readFile fp return $ case eres of @@ -529,12 +532,12 @@ getPreviousResult w x y = withPRPath w x y $ \fp -> do | bs == failureBS -> PRFailure _ -> PRNoResult -savePreviousResult :: PerformBuild -> ResultType -> PackageName -> Bool -> IO () -savePreviousResult pb rt name res = - withPRPath pb rt name $ \fp -> writeFile fp $ +savePreviousResult :: PerformBuild -> ResultType -> PackageIdentifier -> Bool -> IO () +savePreviousResult pb rt ident res = + withPRPath pb rt ident $ \fp -> writeFile fp $ if res then successBS else failureBS -deletePreviousResults :: PerformBuild -> PackageName -> IO () +deletePreviousResults :: PerformBuild -> PackageIdentifier -> IO () deletePreviousResults pb name = forM_ [minBound..maxBound] $ \rt -> withPRPath pb rt name $ \fp -> From cd0e717aab6478b91265512e56336c4441478970 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Mar 2015 08:40:16 +0200 Subject: [PATCH 231/233] File for store build results --- Stackage/PerformBuild.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Stackage/PerformBuild.hs b/Stackage/PerformBuild.hs index e43d0d5a..1aef3af3 100644 --- a/Stackage/PerformBuild.hs +++ b/Stackage/PerformBuild.hs @@ -367,8 +367,10 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = writeIORef isConfiged True inner - unless (pname `member` registeredPackages) $ withConfiged $ do - deletePreviousResults pb pname + prevBuildResult <- getPreviousResult pb Build pident + unless (prevBuildResult == PRSuccess) $ withConfiged $ do + assert (pname `notMember` registeredPackages) $ do + deletePreviousResults pb pident log' $ "Building " ++ namever run "cabal" ["build"] @@ -378,6 +380,8 @@ singleBuild pb@PerformBuild {..} registeredPackages SingleBuild {..} = withMVar sbRegisterMutex $ const $ run "cabal" ["register"] + savePreviousResult pb Build pident True + -- Even if the tests later fail, we can allow other libraries to build -- on top of our successful results -- @@ -497,7 +501,7 @@ copyBuiltInHaddocks docdir = do ------------- Previous results -- | The previous actions that can be run -data ResultType = Haddock | Test +data ResultType = Build | Haddock | Test deriving (Show, Enum, Eq, Ord, Bounded, Read) -- | The result generated on a previous run From ca28a53e91bcb7d0cb8d95cb206b438351cad724 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 13 Mar 2015 08:46:02 +0200 Subject: [PATCH 232/233] Switch default library profiling to true (pinging @manny-fp) --- Stackage/BuildConstraints.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stackage/BuildConstraints.hs b/Stackage/BuildConstraints.hs index e7aae355..c4ce1ceb 100644 --- a/Stackage/BuildConstraints.hs +++ b/Stackage/BuildConstraints.hs @@ -120,7 +120,7 @@ instance FromJSON PackageConstraints where pcBuildBenchmarks <- o .: "build-benchmarks" pcFlagOverrides <- Map.mapKeysWith const mkFlagName <$> o .: "flags" pcMaintainer <- o .:? "maintainer" - pcEnableLibProfile <- fmap (fromMaybe False) (o .:? "library-profiling") + pcEnableLibProfile <- fmap (fromMaybe True) (o .:? "library-profiling") return PackageConstraints {..} -- | The proposed plan from the requirements provided by contributors. From 19a64410d2f440c3d9f1f4fd746aa6b534013f15 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 12 Mar 2015 16:59:57 +0200 Subject: [PATCH 233/233] Add expected test failure network-anonymous-i2p --- build-constraints.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-constraints.yaml b/build-constraints.yaml index 7655b963..1b343254 100644 --- a/build-constraints.yaml +++ b/build-constraints.yaml @@ -1069,6 +1069,9 @@ expected-test-failures: # Problems with linking with system libraries on Ubuntu 12.04 - nettle + # Requires locally running services + - network-anonymous-i2p + # Haddocks which are expected to fail. Same concept as expected test failures. expected-haddock-failures: # https://github.com/acw/bytestring-progress/issues/4