proto-lens-protoc 0.3.1.2 → 0.3.1.3
raw patch · 3 files changed
+32/−10 lines, 3 filesdep ~Cabaldep ~basedep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: Cabal, base, containers
API changes (from Hackage documentation)
- Data.ProtoLens.Compiler.Combinators: CommentedDecl :: (Maybe String) -> Decl -> CommentedDecl
+ Data.ProtoLens.Compiler.Combinators: CommentedDecl :: Maybe String -> Decl -> CommentedDecl
- Data.ProtoLens.Compiler.Combinators: ImportDecl :: l -> ModuleName l -> Bool -> Bool -> Bool -> Maybe String -> Maybe ModuleName l -> Maybe ImportSpecList l -> ImportDecl l
+ Data.ProtoLens.Compiler.Combinators: ImportDecl :: l -> ModuleName l -> Bool -> Bool -> Bool -> Maybe String -> Maybe (ModuleName l) -> Maybe (ImportSpecList l) -> ImportDecl l
- Data.ProtoLens.Compiler.Combinators: Module :: ModuleName -> (Maybe [ExportSpec]) -> [ModulePragma] -> [ImportDecl ()] -> [CommentedDecl] -> Module
+ Data.ProtoLens.Compiler.Combinators: Module :: ModuleName -> Maybe [ExportSpec] -> [ModulePragma] -> [ImportDecl ()] -> [CommentedDecl] -> Module
- Data.ProtoLens.Compiler.Combinators: [importAs] :: ImportDecl l -> Maybe ModuleName l
+ Data.ProtoLens.Compiler.Combinators: [importAs] :: ImportDecl l -> Maybe (ModuleName l)
- Data.ProtoLens.Compiler.Combinators: [importSpecs] :: ImportDecl l -> Maybe ImportSpecList l
+ Data.ProtoLens.Compiler.Combinators: [importSpecs] :: ImportDecl l -> Maybe (ImportSpecList l)
- Data.ProtoLens.Compiler.Definitions: Enum :: (EnumInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: Enum :: EnumInfo n -> Definition n
- Data.ProtoLens.Compiler.Definitions: Message :: (MessageInfo n) -> Definition n
+ Data.ProtoLens.Compiler.Definitions: Message :: MessageInfo n -> Definition n
Files
- Changelog.md +2/−1
- proto-lens-protoc.cabal +7/−7
- src/Data/ProtoLens/Setup.hs +23/−2
Changelog.md view
@@ -1,8 +1,9 @@ # Changelog for `proto-lens-protoc` -## v0.3.1.2+## v0.3.1.3 - Bump the upper bound to `temporary-1.3`. - Fix warnings.+- Add support for ghc-8.6. ## v0.3.1.1 - Fix management of generated files between Cabal components (#171).
proto-lens-protoc.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: e036645bce6a403901857a20fdb899cc2cdd7538d89dad0b5313729d1848d18f+-- hash: 67abce4e43117635551e092a847159fa0cd85ababdeba28c6bd694ab998bbc50 name: proto-lens-protoc-version: 0.3.1.2+version: 0.3.1.3 synopsis: Protocol buffer compiler for the proto-lens library. description: Turn protocol buffer files (.proto) into Haskell files (.hs) which can be used with the proto-lens package. The library component of this package contains compiler code (namely Data.ProtoLens.Compiler.*) is not guaranteed to have stable APIs.'@@ -61,10 +61,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 , data-default-class >=0.0 && <0.2 , deepseq ==1.4.* , directory >=1.2 && <1.4@@ -86,9 +86,9 @@ hs-source-dirs: app build-depends:- base >=4.9 && <4.12+ base >=4.9 && <4.13 , bytestring ==0.10.*- , containers ==0.5.*+ , containers >=0.5 && <0.7 , data-default-class >=0.0 && <0.2 , deepseq ==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@.