Skip to content

Commit

Permalink
fix build with GHC 9.8
Browse files Browse the repository at this point in the history
* drop upper bounds for upgraded packages
* demote x-partial error introduced by GHC 9.8
* use GHC-9.8-friendly fork of ghc-source-gen
* introduce GHC-9.8-enabled stack.yaml
  • Loading branch information
develop7 committed Mar 29, 2024
1 parent 46cb77c commit 985290f
Show file tree
Hide file tree
Showing 24 changed files with 97 additions and 58 deletions.
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ packages:
proto-lens-setup
proto-lens-tests
proto-lens-tests-dep

source-repository-package
type: git
location: https://github.com/ylecornec/ghc-source-gen
tag: ef74dd646805bf823ae093b90e6d9e4843ea182d
4 changes: 2 additions & 2 deletions discrimination-ieee754/discrimination-ieee754.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ library
hs-source-dirs:
src
build-depends:
base >=4.10 && <4.19
base >=4.10 && <4.20
, contravariant >=1.3 && <1.6
, data-binary-ieee754 ==0.4.*
, discrimination >=0.3 && <0.6
Expand All @@ -46,7 +46,7 @@ test-suite test
test
build-depends:
QuickCheck
, base >=4.10 && <4.19
, base >=4.10 && <4.20
, contravariant >=1.3 && <1.6
, data-binary-ieee754 ==0.4.*
, discrimination >=0.3 && <0.6
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.10 && < 4.19
- base >= 4.10 && < 4.20
- data-binary-ieee754 >= 0.4 && < 0.5
- contravariant >= 1.3 && < 1.6
- discrimination >= 0.3 && < 0.6
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-arbitrary/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ extra-source-files:

dependencies:
- proto-lens >= 0.4 && < 0.8
- base >= 4.10 && < 4.19
- bytestring >= 0.10 && < 0.12
- base >= 4.10 && < 4.20
- bytestring
- containers >= 0.5 && < 0.7
- text >= 1.2 && < 2.2
- lens-family >= 1.2 && < 2.2
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-arbitrary/proto-lens-arbitrary.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ library
src
build-depends:
QuickCheck >=2.8 && <2.15
, base >=4.10 && <4.19
, bytestring >=0.10 && <0.12
, base
, bytestring
, containers >=0.5 && <0.7
, lens-family >=1.2 && <2.2
, proto-lens >=0.4 && <0.8
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-benchmarks/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ extra-source-files:

custom-setup:
dependencies:
- base
- base >= 4.10 && < 4.20
- Cabal
- proto-lens-setup

dependencies:
- base
- base >= 4.10 && < 4.20
- criterion
- deepseq
- lens-family
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-discrimination/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ extra-source-files:

custom-setup:
dependencies:
- base >= 4.10 && < 4.19
- base >= 4.10 && < 4.20
- Cabal
- proto-lens-setup >= 0.4 && < 0.5

build-tools: proto-lens-protoc:proto-lens-protoc

dependencies:
- base >= 4.11 && < 4.19
- bytestring >= 0.10 && < 0.12
- base >= 4.10 && < 4.20
- bytestring
- contravariant >= 1.3 && < 1.6
- containers >= 0.5 && < 0.7
- discrimination >= 0.3 && < 0.6
Expand Down
10 changes: 5 additions & 5 deletions proto-lens-discrimination/proto-lens-discrimination.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ source-repository head
custom-setup
setup-depends:
Cabal
, base >=4.10 && <4.19
, base
, proto-lens-setup ==0.4.*

library
Expand All @@ -46,8 +46,8 @@ library
build-tool-depends:
proto-lens-protoc:proto-lens-protoc
build-depends:
base >=4.11 && <4.19
, bytestring >=0.10 && <0.12
base
, bytestring
, containers >=0.5 && <0.7
, contravariant >=1.3 && <1.6
, discrimination >=0.3 && <0.6
Expand Down Expand Up @@ -79,8 +79,8 @@ test-suite discrimination_test
build-depends:
HUnit >=1.3 && <1.7
, QuickCheck >=2.8 && <2.15
, base >=4.11 && <4.19
, bytestring >=0.10 && <0.12
, base
, bytestring
, containers >=0.5 && <0.7
, contravariant >=1.3 && <1.6
, discrimination >=0.3 && <0.6
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.8
- base >= 4.10 && < 4.19
- base >= 4.10 && < 4.20
- optparse-applicative >= 0.13 && < 0.19
- text >= 1.2 && < 2.2

Expand Down
2 changes: 1 addition & 1 deletion proto-lens-optparse/proto-lens-optparse.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library
hs-source-dirs:
src
build-depends:
base >=4.10 && <4.19
base
, optparse-applicative >=0.13 && <0.19
, proto-lens >=0.1 && <0.8
, text >=1.2 && <2.2
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-protobuf-types/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ extra-source-files:

custom-setup:
dependencies:
- base >= 4.10 && < 4.19
- base >= 4.10 && < 4.20
- Cabal >= 3 && < 3.12
- proto-lens-setup == 0.4.*

build-tools: proto-lens-protoc:proto-lens-protoc

dependencies:
- base >= 4.10 && < 4.19
- base >= 4.10 && < 4.20
- lens-family >= 1.2 && < 2.2
- proto-lens == 0.7.*
- proto-lens-runtime == 0.7.*
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-protobuf-types/proto-lens-protobuf-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ source-repository head
custom-setup
setup-depends:
Cabal >=3 && <3.12
, base >=4.10 && <4.19
, base
, proto-lens-setup ==0.4.*

library
Expand Down Expand Up @@ -101,7 +101,7 @@ library
build-tool-depends:
proto-lens-protoc:proto-lens-protoc
build-depends:
base >=4.10 && <4.19
base
, lens-family >=1.2 && <2.2
, proto-lens ==0.7.*
, proto-lens-runtime ==0.7.*
Expand Down
5 changes: 5 additions & 0 deletions proto-lens-protoc/app/Data/ProtoLens/Compiler/Generate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
#if MIN_VERSION_ghc(9,8,0)
-- GHC 9.8 introduces warnings on using partial functions, used below in lines 650, 652, and 657.
-- We disable these warnings to avoid breaking the build.
{-# OPTIONS_GHC -Wno-error=x-partial #-}
#endif
module Data.ProtoLens.Compiler.Generate(
generateModule,
) where
Expand Down
8 changes: 4 additions & 4 deletions proto-lens-protoc/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra-source-files:
- Changelog.md

dependencies:
- base >= 4.10 && < 4.19
- base >= 4.10 && < 4.20
- filepath >= 1.4 && < 1.6

library:
Expand All @@ -30,11 +30,11 @@ executables:
main: protoc-gen-haskell.hs
source-dirs: app
dependencies:
- bytestring >= 0.10 && < 0.12
- bytestring
- containers >= 0.5 && < 0.7
- ghc >= 8.2 && < 9.8
- ghc >= 8.2 && < 9.10
- ghc-paths == 0.1.*
- ghc-source-gen >= 0.4 && < 0.5
- ghc-source-gen
- lens-family >= 1.2 && < 2.2
- pretty == 1.1.*
- proto-lens == 0.7.*
Expand Down
10 changes: 5 additions & 5 deletions proto-lens-protoc/proto-lens-protoc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library
hs-source-dirs:
src
build-depends:
base >=4.10 && <4.19
base
, filepath >=1.4 && <1.6
default-language: Haskell2010

Expand All @@ -55,13 +55,13 @@ executable proto-lens-protoc
hs-source-dirs:
app
build-depends:
base >=4.10 && <4.19
, bytestring >=0.10 && <0.12
base
, bytestring
, containers >=0.5 && <0.7
, filepath >=1.4 && <1.6
, ghc >=8.2 && <9.8
, ghc >=8.2 && <9.10
, ghc-paths ==0.1.*
, ghc-source-gen ==0.4.*
, ghc-source-gen
, lens-family >=1.2 && <2.2
, pretty ==1.1.*
, proto-lens ==0.7.*
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-runtime/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ extra-source-files:

library:
dependencies:
- base >= 4.10 && < 4.19
- bytestring >= 0.10 && < 0.12
- base >= 4.10 && < 4.20
- bytestring
- containers >= 0.5 && < 0.7
- deepseq == 1.4.*
- deepseq
- filepath >= 1.4 && < 1.6
- lens-family >= 1.2 && < 2.2
- proto-lens == 0.7.*
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-runtime/proto-lens-runtime.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ library
, Lens.Family2.Unchecked as Data.ProtoLens.Runtime.Lens.Family2.Unchecked
, Text.Read as Data.ProtoLens.Runtime.Text.Read
build-depends:
base >=4.10 && <4.19
, bytestring >=0.10 && <0.12
base
, bytestring
, containers >=0.5 && <0.7
, deepseq ==1.4.*
, deepseq
, filepath >=1.4 && <1.6
, lens-family >=1.2 && <2.2
, proto-lens ==0.7.*
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-setup/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ extra-source-files:
library:
source-dirs: src
dependencies:
- base >= 4.10 && < 4.19
- bytestring >= 0.10 && < 0.12
- base >= 4.10 && < 4.20
- bytestring
- containers >= 0.5 && < 0.7
- Cabal >= 2.0 && < 3.12
- deepseq == 1.4.*
- deepseq
- directory >= 1.2 && < 1.4
- filepath >= 1.4 && < 1.6
- process >= 1.2 && < 1.7
Expand Down
6 changes: 3 additions & 3 deletions proto-lens-setup/proto-lens-setup.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ library
src
build-depends:
Cabal >=2.0 && <3.12
, base >=4.10 && <4.19
, bytestring >=0.10 && <0.12
, base
, bytestring
, containers >=0.5 && <0.7
, deepseq ==1.4.*
, deepseq
, directory >=1.2 && <1.4
, filepath >=1.4 && <1.6
, process >=1.2 && <1.7
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-tests-dep/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ extra-source-files:

custom-setup:
dependencies:
- base
- base >= 4.10 && < 4.20
- Cabal
- proto-lens-setup

build-tools: proto-lens-protoc:proto-lens-protoc

dependencies:
- proto-lens-runtime
- base
- base >= 4.10 && < 4.20

library:
generated-exposed-modules:
Expand Down
4 changes: 2 additions & 2 deletions proto-lens-tests/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ verbatim:

custom-setup:
dependencies:
- base
- base >= 4.10 && < 4.20
- Cabal
- proto-lens-setup

Expand All @@ -24,7 +24,7 @@ build-tools: proto-lens-protoc:proto-lens-protoc
# Dependencies shared by the library and/or several of the tests:
dependencies:
- QuickCheck
- base
- base >= 4.10 && < 4.20
- bytestring
- lens-family
- pretty
Expand Down
12 changes: 6 additions & 6 deletions proto-lens/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ library:
- Data.ProtoLens.Encoding.Parser.Internal
- Data.ProtoLens.TextFormat.Parser
dependencies:
- base >= 4.10 && < 4.19
- bytestring >= 0.10 && < 0.12
- base >= 4.10 && < 4.20
- bytestring
- containers >= 0.5 && < 0.7
- deepseq == 1.4.*
- ghc-prim >= 0.4 && < 0.11
- deepseq
- ghc-prim
- lens-family >= 1.2 && < 2.2
- parsec == 3.1.*
- pretty == 1.1.*
Expand All @@ -54,7 +54,7 @@ tests:
main: parser_test.hs
source-dirs: tests
dependencies:
- base
- base >= 4.10 && < 4.20
- bytestring
- proto-lens
- QuickCheck
Expand All @@ -65,7 +65,7 @@ tests:
main: growing_test.hs
source-dirs: tests
dependencies:
- base
- base >= 4.10 && < 4.20
- vector
- proto-lens
- QuickCheck
Expand Down
8 changes: 4 additions & 4 deletions proto-lens/proto-lens.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ library
hs-source-dirs:
src
build-depends:
base >=4.10 && <4.19
, bytestring >=0.10 && <0.12
base
, bytestring
, containers >=0.5 && <0.7
, deepseq ==1.4.*
, ghc-prim >=0.4 && <0.11
, deepseq
, ghc-prim
, lens-family >=1.2 && <2.2
, parsec ==3.1.*
, pretty ==1.1.*
Expand Down
Loading

0 comments on commit 985290f

Please sign in to comment.