Skip to content

Commit

Permalink
Build with ghc-8.6.1 using Stackage nightly.
Browse files Browse the repository at this point in the history
Cherry-pick of google#242.

Also bumped the package versions to enable new releases.
  • Loading branch information
judah committed Mar 16, 2019
1 parent ab40809 commit 7525f0c
Show file tree
Hide file tree
Showing 20 changed files with 88 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ matrix:
addons: {apt: {packages: [libgmp-dev]}}
- env: BUILD=stack STACK='stack' # Use the resolver in stack.yaml
addons: {apt: {packages: [libgmp-dev]}}
- env: BUILD=stack STACK='stack --stack-yaml=stack-ghc-8.6.yaml'
addons: {apt: {packages: [libgmp-dev]}}

before_install:
- mkdir -p $HOME/.local/bin
Expand Down
2 changes: 1 addition & 1 deletion discrimination-ieee754/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license: BSD3
github: google/proto-lens/discrimination-ieee754

dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- data-binary-ieee754 >= 0.4 && < 0.5
- contravariant >= 1.3 && < 1.5
- discrimination >= 0.3 && < 0.4
Expand Down
3 changes: 3 additions & 0 deletions lens-labels/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for `lens-labels`

## v0.2.0.3
- Add support for ghc-8.6.

## v0.2.0.2
- Bump the lower bound on `base` to indicate we require `ghc>=8.0`.

Expand Down
4 changes: 2 additions & 2 deletions lens-labels/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: lens-labels
version: "0.2.0.2"
version: "0.2.0.3"
synopsis: Integration of lenses with OverloadedLabels.
description: >
Provides a framework to integrate lenses with GHC's OverloadedLabels
Expand All @@ -20,7 +20,7 @@ library:
- Lens.Labels.Unwrapped
- Lens.Labels.Prism
dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- ghc-prim >= 0.4 && < 0.6
- profunctors >= 5.2
- tagged >= 0.8
3 changes: 3 additions & 0 deletions proto-lens-arbitrary/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for `proto-lens-arbitrary`

## v0.1.2.2.1
- Add support for ghc-8.6.

## v0.1.2.2
- Bump the lower bound on `base` to indicate we require `ghc>=8.0`.

Expand Down
6 changes: 3 additions & 3 deletions proto-lens-arbitrary/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: proto-lens-arbitrary
version: "0.1.2.2"
version: "0.1.2.2.1"
synopsis: Arbitrary instances for proto-lens.
description: >
The proto-lens-arbitrary allows generating arbitrary messages for
Expand All @@ -15,9 +15,9 @@ extra-source-files:

dependencies:
- proto-lens == 0.3.*
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- bytestring == 0.10.*
- containers == 0.5.*
- containers >= 0.5 && < 0.7
- text == 1.2.*
- lens-family == 1.2.*
- QuickCheck >= 2.8 && < 2.12
Expand Down
3 changes: 3 additions & 0 deletions proto-lens-combinators/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for `proto-lens-combinators`

## v0.1.0.11
- Add support for ghc-8.6.

## v0.1.0.11
- Bump the lower bound on `base` to indicate we require `ghc>=8.0`.
- Use autogen-modules. (#196)
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-combinators/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: proto-lens-combinators
version: '0.1.0.11'
version: '0.1.0.12'
synopsis: Utilities functions to proto-lens.
description: Useful things for working with protos.
category: Data
Expand All @@ -14,12 +14,12 @@ extra-source-files:

custom-setup:
dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- Cabal
- proto-lens-protoc == 0.3.*

dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- proto-lens-protoc == 0.3.*
- lens-family == 1.2.*

Expand Down
4 changes: 2 additions & 2 deletions proto-lens-discrimination/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ extra-source-files:

custom-setup:
dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- Cabal
- proto-lens-protoc == 0.3.*

dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- data-default >= 0.5 && < 0.8
- bytestring == 0.10.*
- contravariant >= 1.3 && < 1.5
Expand Down
2 changes: 1 addition & 1 deletion proto-lens-optparse/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extra-source-files:

dependencies:
- proto-lens >= 0.1 && < 0.4
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- optparse-applicative >= 0.12 && < 0.15
- text == 1.2.*

Expand Down
3 changes: 3 additions & 0 deletions proto-lens-protobuf-types/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for `proto-lens-protobuf-types`

## v0.3.0.3
- Add support for ghc-8.6.

## v0.3.0.2
- Bump the lower bound on `base` to indicate we require `ghc>=8.0`.
- Use autogen-modules. (#196)
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-protobuf-types/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: proto-lens-protobuf-types
version: '0.3.0.2'
version: '0.3.0.3'
synopsis: Basic protocol buffer message types.
description: >
This package provides bindings standard protocol message types,
Expand All @@ -19,12 +19,12 @@ extra-source-files:

custom-setup:
dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- Cabal
- proto-lens-protoc == 0.3.*

dependencies:
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- lens-labels == 0.2.*
- proto-lens == 0.3.*
- proto-lens-protoc == 0.3.*
Expand Down
3 changes: 2 additions & 1 deletion proto-lens-protoc/Changelog.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
8 changes: 4 additions & 4 deletions proto-lens-protoc/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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
Expand All @@ -17,9 +17,9 @@ extra-source-files:
- Changelog.md

dependencies:
- 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
Expand All @@ -32,7 +32,7 @@ dependencies:
library:
source-dirs: src
dependencies:
- Cabal >= 1.22 && < 2.3
- Cabal >= 1.22 && < 2.5
- directory >= 1.2 && < 1.4
- lens-labels == 0.2.*
- pretty == 1.1.*
Expand Down
25 changes: 23 additions & 2 deletions proto-lens-protoc/src/Data/ProtoLens/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import Distribution.PackageDescription
, extraSrcFiles
#if !MIN_VERSION_Cabal(2,0,0)
, hsSourceDirs
#endif
#if MIN_VERSION_Cabal(2,4,0)
, specVersion
#endif
, libBuildInfo
, otherModules
Expand All @@ -68,14 +71,25 @@ import Distribution.Simple.Setup (fromFlag, copyDest, copyVerbosity)
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
Expand Down Expand Up @@ -158,13 +172,20 @@ generatingProtos root = generatingSpecificProtos root getProtos
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@.
Expand Down
7 changes: 5 additions & 2 deletions proto-lens-tests/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ author: Judah Jacobson
maintainer: [email protected]
copyright: Google Inc.
license: BSD3
extra-source-files:
- tests/*.proto
# Use extra-source-files verbatim since hpack otherwise expands the glob
# to an explicit list in the Cabal file.
# We want to test that globs within Cabal files are supported.
verbatim:
extra-source-files: tests/*.proto

custom-setup:
dependencies:
Expand Down
1 change: 1 addition & 0 deletions proto-lens-tutorial/stack-ghc-8.6.yaml
3 changes: 2 additions & 1 deletion proto-lens/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog for `proto-lens`

## v0.3.1.1
## v0.3.1.3
- Bump the lower bound on `base` to indicate we require `ghc>=8.0`.
- Add support for ghc-8.6.

## v0.3.1.0
- Improve references to types/fields in decoding error messages (#187).
Expand Down
6 changes: 3 additions & 3 deletions proto-lens/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: proto-lens
version: "0.3.1.1"
version: "0.3.1.3"
synopsis: A lens-based implementation of protocol buffers in Haskell.
description: >
The proto-lens library provides to protocol buffers using modern
Expand Down Expand Up @@ -46,9 +46,9 @@ library:
- Data.ProtoLens.TextFormat.Parser
dependencies:
- attoparsec == 0.13.*
- base >= 4.9 && < 4.12
- base >= 4.9 && < 4.13
- bytestring == 0.10.*
- containers == 0.5.*
- containers >= 0.5 && < 0.7
- deepseq == 1.4.*
- data-default-class >= 0.0 && < 0.2
- lens-family == 1.2.*
Expand Down
19 changes: 19 additions & 0 deletions stack-ghc-8.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resolver: nightly-2018-09-29
packages:
# - discrimination-ieee754
- lens-labels
- proto-lens
- proto-lens-arbitrary
# Criterion doesn't build with nightly yet:
# - proto-lens-benchmarks
- proto-lens-combinators
# - proto-lens-discrimination
- proto-lens-optparse
- proto-lens-protobuf-types
- proto-lens-protoc
- proto-lens-tests
- proto-lens-tests-dep
extra-deps:
# These don't build with nightly yet:
# - discrimination-0.3
# - promises-0.3

0 comments on commit 7525f0c

Please sign in to comment.