packages feed

proto-lens-setup 0.4.0.0 → 0.4.0.1

raw patch · 3 files changed

+34/−8 lines, 3 filesdep ~Cabaldep ~basedep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: Cabal, base, containers

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,6 +1,11 @@ # Changelog for `proto-lens-setup` -## v0.4+## v0.4.0.1+- Bump the lower bound on `base` and `containers` to support `ghc-8.6.1`.+- Support `Cabal-2.4.*`.+++## v0.4.0.0 - Split out from `proto-lens-protoc`.  ## Older
proto-lens-setup.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: f1feed5b1976417184fb9af0ad32240ff5ce3534e0d0d8d6471b20fe0d95a41d+-- hash: 8bb5acc6ba82c97e859a52ad048e923f08f00f3be564be8723f2e353926287df  name:           proto-lens-setup-version:        0.4.0.0+version:        0.4.0.1 synopsis:       Cabal support for codegen with proto-lens. description:    This package provides Cabal support for the @proto-lens@ package.                 It automatically generates Haskell source files from protocol buffer@@ -69,10 +69,10 @@   hs-source-dirs:       src   build-depends:-      Cabal >=1.22 && <2.3-    , base >=4.9 && <4.12+      Cabal >=1.22 && <2.5+    , base >=4.9 && <4.13     , bytestring ==0.10.*-    , containers ==0.5.*+    , containers >=0.5 && <0.7     , deepseq ==1.4.*     , directory >=1.2 && <1.4     , filepath >=1.4 && <1.6
src/Data/ProtoLens/Setup.hs view
@@ -44,6 +44,9 @@ #if !MIN_VERSION_Cabal(2,0,0)     , hsSourceDirs #endif+#if MIN_VERSION_Cabal(2,4,0)+    , specVersion+#endif     , libBuildInfo     , otherModules     , testBuildInfo@@ -68,14 +71,25 @@ import Distribution.Simple.Utils     ( createDirectoryIfMissingVerbose     , installOrdinaryFile+#if MIN_VERSION_Cabal(2,4,0)+#else     , matchFileGlob+#endif     )+#if MIN_VERSION_Cabal(2,4,0)+import Distribution.Simple.Glob (matchDirFileGlob)+#endif import Distribution.Simple     ( defaultMainWithHooks     , simpleUserHooks     , UserHooks(..)     )-import Distribution.Verbosity (Verbosity)+import Distribution.Verbosity+    ( Verbosity+#if MIN_VERSION_Cabal(2,4,0)+    , normal+#endif+    ) import System.FilePath     ( (</>)     , equalFilePath@@ -158,13 +172,20 @@   where     getProtos l = do       -- Replicate Cabal's own logic for parsing file globs.-      files <- concat <$> mapM matchFileGlob (extraSrcFiles $ localPkgDescr l)+      files <- concat <$> mapM (match $ localPkgDescr l)+                               (extraSrcFiles $ localPkgDescr l)       pure            . filter (\f -> takeExtension f == ".proto")            . map (makeRelative root)            . filter (isSubdirectoryOf root)            $ files +match :: PackageDescription -> FilePath -> IO [FilePath]+#if MIN_VERSION_Cabal(2,4,0)+match desc f = matchDirFileGlob normal (specVersion desc) "." f+#else+match _ f = matchFileGlob f+#endif  -- | Augment the given 'UserHooks' to auto-generate Haskell files from the -- .proto files returned by a function @getProtos@.