packages feed

haskell-ci 0.14 → 0.14.2

raw patch · 9 files changed

+31/−14 lines, 9 filesdep ~cabal-install-parsersPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: cabal-install-parsers

API changes (from Hackage documentation)

+ HaskellCI.Config.Ubuntu: instance GHC.Enum.Bounded HaskellCI.Config.Ubuntu.Ubuntu
+ HaskellCI.Config.Ubuntu: instance GHC.Enum.Enum HaskellCI.Config.Ubuntu.Ubuntu
- HaskellCI.Auxiliary: Auxiliary :: [Package] -> [URI] -> String -> Bool -> Bool -> CompilerRange -> Bool -> [PrettyField ()] -> String -> Auxiliary
+ HaskellCI.Auxiliary: Auxiliary :: [Package] -> [URI] -> String -> Bool -> Bool -> CompilerRange -> Bool -> (FilePath -> [PrettyField ()]) -> String -> Auxiliary
- HaskellCI.Auxiliary: [extraCabalProjectFields] :: Auxiliary -> [PrettyField ()]
+ HaskellCI.Auxiliary: [extraCabalProjectFields] :: Auxiliary -> FilePath -> [PrettyField ()]

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+## 0.14.2 - 2021-02-19++- Pass `default-language` to `doctest`+- Support local `.tar.gz` tarballs in `packages:`.+ ## 0.14 - 2022-01-05  - Add GHC-9.0 releases and GHC-9.2.1
haskell-ci.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               haskell-ci-version:            0.14+version:            0.14.2 synopsis:           Cabal package script generator for Travis-CI description:   Script generator (@haskell-ci@) for@@ -157,7 +157,7 @@     , attoparsec                     ^>=0.14.1     , base-compat                    ^>=0.11 || ^>=0.12     , base16-bytestring              ^>=1.0.1.0-    , cabal-install-parsers          ^>=0.4.4+    , cabal-install-parsers          ^>=0.4.5     , cryptohash-sha256              ^>=0.11.101.0     , exceptions                     ^>=0.10.0     , generic-lens-lite              ^>=0.1
src/HaskellCI/Auxiliary.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE MultiWayIf        #-} {-# LANGUAGE NamedFieldPuns    #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards   #-}@@ -18,6 +19,7 @@ import qualified Distribution.Pretty                          as C import qualified Distribution.Types.GenericPackageDescription as C import qualified Distribution.Types.VersionRange              as C+import qualified Network.URI                                  as URI import qualified Text.PrettyPrint                             as PP  import Cabal.Optimization@@ -26,8 +28,8 @@ import HaskellCI.Compiler import HaskellCI.Config import HaskellCI.Config.CopyFields-import HaskellCI.Config.Doctest import HaskellCI.Config.Docspec+import HaskellCI.Config.Doctest import HaskellCI.Jobs import HaskellCI.List import HaskellCI.Package@@ -41,7 +43,7 @@     , docspecEnabled          :: Bool     , hasTests                :: CompilerRange     , hasLibrary              :: Bool-    , extraCabalProjectFields :: [C.PrettyField ()]+    , extraCabalProjectFields :: FilePath -> [C.PrettyField ()]     , testShowDetails         :: String     } @@ -69,11 +71,13 @@      hasLibrary = any (\Pkg{pkgGpd} -> isJust $ C.condLibrary pkgGpd) pkgs -    extraCabalProjectFields :: [C.PrettyField ()]-    extraCabalProjectFields = buildList $ do+    extraCabalProjectFields :: FilePath -> [C.PrettyField ()]+    extraCabalProjectFields rootdir = buildList $ do         -- generate package fields for URI packages.         for_ uris $ \uri ->-            item $ C.PrettyField () "packages" $ PP.text $ uriToString id uri ""+            item $ C.PrettyField () "packages" $ PP.text $ if+                | URI.uriScheme uri == "file:" -> rootdir ++ URI.uriPath uri+                | otherwise                    -> uriToString id uri ""          -- copy fields from original cabal.project         case cfgCopyFields of
src/HaskellCI/Bash.hs view
@@ -104,7 +104,7 @@                     ]              -- extra cabal.project fields-            cat "cabal.project" $ C.showFields' (const []) (const id) 2 extraCabalProjectFields+            cat "cabal.project" $ C.showFields' (const []) (const id) 2 $ extraCabalProjectFields ""              -- also write cabal.project.local file with             -- @
src/HaskellCI/Config.hs view
@@ -142,7 +142,11 @@     <*> C.optionalField       "jobs"                                                          (field @"cfgJobs")         ^^^ metahelp "JOBS" "jobs (N:M - cabal:ghc)"     <*> C.optionalFieldDef    "distribution"                                                  (field @"cfgUbuntu") Bionic-        ^^^ metahelp "DIST" "distribution version (xenial, bionic)"+        ^^^ metahelp "DIST" (concat+              [ "distribution version ("+              , intercalate ", " $ map showUbuntu [minBound..maxBound]+              , ")"+              ])     <*> C.optionalFieldDef    "jobs-selection"                                                (field @"cfgTestedWith") TestedWithUniform         ^^^ metahelp "uniform|any" "Jobs selection across packages"     <*> rangeField            "enabled"                                                       (field @"cfgEnabledJobs") anyVersion
src/HaskellCI/Config/Ubuntu.hs view
@@ -7,7 +7,7 @@ import qualified Text.PrettyPrint    as PP  data Ubuntu = Xenial | Bionic | Focal-  deriving (Eq, Ord, Show)+  deriving (Eq, Ord, Show, Enum, Bounded)  instance C.Parsec Ubuntu where     parsec = do
src/HaskellCI/GitHub.hs view
@@ -405,7 +405,7 @@                     ]              -- extra cabal.project fields-            cat "cabal.project" $ C.showFields' (const []) (const id) 2 extraCabalProjectFields+            cat "cabal.project" $ C.showFields' (const []) (const id) 2 $ extraCabalProjectFields "$GITHUB_WORKSPACE/source/"              -- If using head.hackage, allow building with newer versions of GHC boot libraries.             -- Note that we put this in a cabal.project file, not ~/.cabal/config, in order to avoid
src/HaskellCI/Tools.hs view
@@ -55,7 +55,7 @@ libraryModuleArgs :: C.Library -> [String] libraryModuleArgs l     | null dirsOrMods = []-    | otherwise       = exts ++ dirsOrMods+    | otherwise       = lang ++ exts ++ dirsOrMods   where     bi = l ^. L.buildInfo @@ -63,12 +63,14 @@         | null (C.hsSourceDirs bi) = map C.prettyShow (C.exposedModules l)         | otherwise                = map C.getSymbolicPath $ C.hsSourceDirs bi +    lang = maybe [] (pure . ("-X" ++) . C.prettyShow) (C.defaultLanguage bi)+     exts = map (("-X" ++) . C.prettyShow) (C.defaultExtensions bi)  executableModuleArgs :: C.Executable -> [String] executableModuleArgs e     | null dirsOrMods = []-    | otherwise       = exts ++ dirsOrMods+    | otherwise       = lang ++ exts ++ dirsOrMods   where     bi = e ^. L.buildInfo @@ -76,6 +78,8 @@         -- note: we don't try to find main_is location, if hsSourceDirs is empty.         | null (C.hsSourceDirs bi) = map C.prettyShow (C.otherModules bi)         | otherwise                = map C.getSymbolicPath $ C.hsSourceDirs bi++    lang = maybe [] (pure . ("-X" ++) . C.prettyShow) (C.defaultLanguage bi)      exts = map (("-X" ++) . C.prettyShow) (C.defaultExtensions bi) 
src/HaskellCI/Travis.hs view
@@ -601,7 +601,7 @@                 sh "echo 'package *' >> cabal.project"                 sh "echo '  ghc-options: -Werror=missing-methods' >> cabal.project" -        cat "cabal.project" $ lines $ C.showFields' (const []) (const id) 2 extraCabalProjectFields+        cat "cabal.project" $ lines $ C.showFields' (const []) (const id) 2 $ extraCabalProjectFields ""          -- If using head.hackage, allow building with newer versions of GHC boot libraries.         -- Note that we put this in a cabal.project file, not ~/.cabal/config, in order to avoid