shake-cabal 0.2.1.1 → 0.2.2.1
raw patch · 4 files changed
+46/−37 lines, 4 filesdep ~shakePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: shake
API changes (from Hackage documentation)
- Development.Shake.Cabal: cabalOracle :: Rules (CabalVersion -> Action String)
+ Development.Shake.Cabal: cabalOracle :: Rules CabalOracle
Files
- CHANGELOG.md +4/−0
- shake-cabal.cabal +33/−31
- src/Development/Shake/Cabal.hs +5/−5
- src/Development/Shake/Cabal/Oracles.hs +4/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # shake-cabal +## 0.2.2.1++ * Support `shake` 0.18.4+ ## 0.2.2.0 * Export `CabalVersion` so `cabalOracle` is usable
shake-cabal.cabal view
@@ -1,43 +1,44 @@-cabal-version: 1.18-name: shake-cabal-version: 0.2.1.1-license: BSD3-license-file: LICENSE-copyright: Copyright: (c) 2018-2019 Vanessa McHale-maintainer: vanessa.mchale@iohk.io-author: Vanessa McHale-bug-reports: https://hub.darcs.net/vmchale/ats/issues-synopsis: Shake library for use with cabal+cabal-version: 1.18+name: shake-cabal+version: 0.2.2.1+license: BSD3+license-file: LICENSE+copyright: Copyright: (c) 2018-2019 Vanessa McHale+maintainer: vamchale@gmail.com+author: Vanessa McHale+bug-reports: https://github.com/vmchale/atspkg/issues+synopsis: Shake library for use with cabal description: A library for using [shake](http://hackage.haskell.org/package/shake) alongside [cabal](https://www.haskell.org/cabal/).-category: Development-build-type: Simple-extra-doc-files: README.md- CHANGELOG.md +category: Development+build-type: Simple+extra-doc-files:+ README.md+ CHANGELOG.md+ source-repository head- type: darcs- location: https://hub.darcs.net/vmchale/ats+ type: git+ location: git@github.com:vmchale/atspkg.git+ subdir: shake-cabal flag development- description:- Enable `-Werror`- default: False- manual: True+ description: Enable `-Werror`+ default: False+ manual: True library- exposed-modules:- Development.Shake.Cabal- hs-source-dirs: src- other-modules:- Development.Shake.Cabal.Oracles+ exposed-modules: Development.Shake.Cabal+ hs-source-dirs: src+ other-modules: Development.Shake.Cabal.Oracles default-language: Haskell2010- other-extensions: DeriveAnyClass DeriveGeneric DeriveDataTypeable- TypeFamilies- ghc-options: -Wall+ other-extensions:+ DeriveAnyClass DeriveGeneric DeriveDataTypeable TypeFamilies++ ghc-options: -Wall build-depends: base >=4.8 && <5,- shake >=0.14,+ shake >=0.18.4, Cabal >=2.2, directory -any, composition-prelude -any,@@ -50,8 +51,9 @@ ghc-options: -Werror if impl(ghc >=8.0)- ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates- -Wredundant-constraints -Wnoncanonical-monad-instances+ ghc-options:+ -Wincomplete-uni-patterns -Wincomplete-record-updates+ -Wredundant-constraints -Wnoncanonical-monad-instances if impl(ghc >=8.4) ghc-options: -Wmissing-export-lists
src/Development/Shake/Cabal.hs view
@@ -76,15 +76,15 @@ extract :: CondTree a b c -> [c] extract (CondNode d _ []) = [d] extract (CondNode d _ bs) = d : (g =<< bs)- where g (CondBranch _ tb fb) = join $ catMaybes [Just $ extract tb, extract <$> fb]+ where g (CondBranch _ tb fb) = concat $ catMaybes [Just $ extract tb, extract <$> fb] -- | Assign each shake @Verbosity@ level to a Cabal @Verbosity@ level. shakeVerbosityToCabalVerbosity :: Shake.Verbosity -> Distribution.Verbosity shakeVerbosityToCabalVerbosity Silent = silent-shakeVerbosityToCabalVerbosity Quiet = normal-shakeVerbosityToCabalVerbosity Normal = normal-shakeVerbosityToCabalVerbosity Loud = verbose-shakeVerbosityToCabalVerbosity Chatty = verbose+shakeVerbosityToCabalVerbosity Error = normal+shakeVerbosityToCabalVerbosity Warn = normal+shakeVerbosityToCabalVerbosity Info = verbose+shakeVerbosityToCabalVerbosity Verbose = verbose shakeVerbosityToCabalVerbosity Diagnostic = deafening -- | Get cabal dependencies, respecting verbosity level given to
src/Development/Shake/Cabal/Oracles.hs view
@@ -7,6 +7,7 @@ -- causes previously valid code to not typecheck... ok module Development.Shake.Cabal.Oracles ( hsOracle , cabalOracle+ , CabalOracle , HsCompiler (..) , CabalVersion (..) ) where@@ -18,6 +19,8 @@ import Development.Shake import GHC.Generics (Generic) +type CabalOracle = CabalVersion -> Action String+ -- | Use this for tracking 'HsCompiler' -- -- @since 0.2.1.0@@ -27,7 +30,7 @@ -- | Use this to track the version of cabal globally available -- -- @since 0.2.1.0-cabalOracle :: Rules (CabalVersion -> Action String)+cabalOracle :: Rules CabalOracle cabalOracle = addOracle $ \CabalVersion -> do (Stdout out) <- command [] "cabal" [ "--numeric-version"] pure out