Skip to content

Commit

Permalink
Change to enable source-constraints depending on GHC version
Browse files Browse the repository at this point in the history
* Stack fails to execute plugins with GHC 9.6 and therefore we disable
  SourceConstraints on GHC 9.6
  • Loading branch information
epicallan committed Nov 16, 2023
1 parent fc3384a commit f06615c
Show file tree
Hide file tree
Showing 25 changed files with 287 additions and 179 deletions.
18 changes: 11 additions & 7 deletions aws-checkip/aws-checkip.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -78,11 +78,13 @@ library
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -141,8 +143,10 @@ test-suite test
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
18 changes: 11 additions & 7 deletions aws-rds/aws-rds.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.5.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -77,11 +77,13 @@ library
, stratosphere-iam
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -139,8 +141,10 @@ test-suite test
, text
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
16 changes: 10 additions & 6 deletions aws-secrets/aws-secrets.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ library
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -152,8 +154,10 @@ test-suite test
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
18 changes: 11 additions & 7 deletions aws-temporary-ingress-rule/aws-temporary-ingress-rule.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.4.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -93,11 +93,13 @@ library
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -170,8 +172,10 @@ test-suite test
, unliftio
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
24 changes: 15 additions & 9 deletions bounded/bounded.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ library
, text
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite readme
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -122,11 +124,13 @@ test-suite readme
, text
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -181,8 +185,10 @@ test-suite test
, type-spec
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
16 changes: 10 additions & 6 deletions cbt/cbt.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ library
, uuid >=1.3
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -174,8 +176,10 @@ test-suite test
, uuid >=1.3
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
18 changes: 11 additions & 7 deletions cli-utils/cli-utils.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -67,11 +67,13 @@ library
, optparse-applicative
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -118,8 +120,10 @@ test-suite test
, tasty
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
12 changes: 7 additions & 5 deletions common/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
when:
- condition: flag(development)
then:
ghc-options:
- -Werror
- -fplugin=SourceConstraints
dependencies:
- source-constraints
ghc-options: -Werror
else:
ghc-options: -Wwarn

# GHC 9.6 currently doesn't play nice with plugins when stack
# https://github.com/commercialhaskell/stack/issues/6251
- condition: impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
dependencies: source-constraints

ghc-options:
- -Wall
- -Wcompat
Expand Down
18 changes: 11 additions & 7 deletions conversions/conversions.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -75,11 +75,13 @@ library
, text
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

test-suite test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -131,8 +133,10 @@ test-suite test
, text
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
24 changes: 15 additions & 9 deletions dbt/dbt.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ library
, unliftio-core >=0.2
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints

executable dbt
main-is: Main.hs
Expand Down Expand Up @@ -167,11 +169,13 @@ executable dbt
, unliftio-core >=0.2
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
if flag(development)
buildable: True
else
Expand Down Expand Up @@ -246,8 +250,10 @@ test-suite test
, unliftio-core >=0.2
default-language: Haskell2010
if flag(development)
ghc-options: -Werror -fplugin=SourceConstraints
build-depends:
source-constraints
ghc-options: -Werror
else
ghc-options: -Wwarn
if impl(ghc < 9.5)
ghc-options: -fplugin=SourceConstraints
build-depends:
source-constraints
Loading

0 comments on commit f06615c

Please sign in to comment.