Skip to content

Commit f06615c

Browse files
committed
Change to enable source-constraints depending on GHC version
* Stack fails to execute plugins with GHC 9.6 and therefore we disable SourceConstraints on GHC 9.6
1 parent fc3384a commit f06615c

File tree

25 files changed

+287
-179
lines changed

25 files changed

+287
-179
lines changed

aws-checkip/aws-checkip.cabal

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22

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

@@ -78,11 +78,13 @@ library
7878
, unliftio
7979
default-language: Haskell2010
8080
if flag(development)
81-
ghc-options: -Werror -fplugin=SourceConstraints
82-
build-depends:
83-
source-constraints
81+
ghc-options: -Werror
8482
else
8583
ghc-options: -Wwarn
84+
if impl(ghc < 9.5)
85+
ghc-options: -fplugin=SourceConstraints
86+
build-depends:
87+
source-constraints
8688

8789
test-suite test
8890
type: exitcode-stdio-1.0
@@ -141,8 +143,10 @@ test-suite test
141143
, unliftio
142144
default-language: Haskell2010
143145
if flag(development)
144-
ghc-options: -Werror -fplugin=SourceConstraints
145-
build-depends:
146-
source-constraints
146+
ghc-options: -Werror
147147
else
148148
ghc-options: -Wwarn
149+
if impl(ghc < 9.5)
150+
ghc-options: -fplugin=SourceConstraints
151+
build-depends:
152+
source-constraints

aws-rds/aws-rds.cabal

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22

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

@@ -77,11 +77,13 @@ library
7777
, stratosphere-iam
7878
default-language: Haskell2010
7979
if flag(development)
80-
ghc-options: -Werror -fplugin=SourceConstraints
81-
build-depends:
82-
source-constraints
80+
ghc-options: -Werror
8381
else
8482
ghc-options: -Wwarn
83+
if impl(ghc < 9.5)
84+
ghc-options: -fplugin=SourceConstraints
85+
build-depends:
86+
source-constraints
8587

8688
test-suite test
8789
type: exitcode-stdio-1.0
@@ -139,8 +141,10 @@ test-suite test
139141
, text
140142
default-language: Haskell2010
141143
if flag(development)
142-
ghc-options: -Werror -fplugin=SourceConstraints
143-
build-depends:
144-
source-constraints
144+
ghc-options: -Werror
145145
else
146146
ghc-options: -Wwarn
147+
if impl(ghc < 9.5)
148+
ghc-options: -fplugin=SourceConstraints
149+
build-depends:
150+
source-constraints

aws-secrets/aws-secrets.cabal

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ library
8484
, unliftio
8585
default-language: Haskell2010
8686
if flag(development)
87-
ghc-options: -Werror -fplugin=SourceConstraints
88-
build-depends:
89-
source-constraints
87+
ghc-options: -Werror
9088
else
9189
ghc-options: -Wwarn
90+
if impl(ghc < 9.5)
91+
ghc-options: -fplugin=SourceConstraints
92+
build-depends:
93+
source-constraints
9294

9395
test-suite test
9496
type: exitcode-stdio-1.0
@@ -152,8 +154,10 @@ test-suite test
152154
, unliftio
153155
default-language: Haskell2010
154156
if flag(development)
155-
ghc-options: -Werror -fplugin=SourceConstraints
156-
build-depends:
157-
source-constraints
157+
ghc-options: -Werror
158158
else
159159
ghc-options: -Wwarn
160+
if impl(ghc < 9.5)
161+
ghc-options: -fplugin=SourceConstraints
162+
build-depends:
163+
source-constraints

aws-temporary-ingress-rule/aws-temporary-ingress-rule.cabal

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22

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

@@ -93,11 +93,13 @@ library
9393
, unliftio
9494
default-language: Haskell2010
9595
if flag(development)
96-
ghc-options: -Werror -fplugin=SourceConstraints
97-
build-depends:
98-
source-constraints
96+
ghc-options: -Werror
9997
else
10098
ghc-options: -Wwarn
99+
if impl(ghc < 9.5)
100+
ghc-options: -fplugin=SourceConstraints
101+
build-depends:
102+
source-constraints
101103

102104
test-suite test
103105
type: exitcode-stdio-1.0
@@ -170,8 +172,10 @@ test-suite test
170172
, unliftio
171173
default-language: Haskell2010
172174
if flag(development)
173-
ghc-options: -Werror -fplugin=SourceConstraints
174-
build-depends:
175-
source-constraints
175+
ghc-options: -Werror
176176
else
177177
ghc-options: -Wwarn
178+
if impl(ghc < 9.5)
179+
ghc-options: -fplugin=SourceConstraints
180+
build-depends:
181+
source-constraints

bounded/bounded.cabal

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ library
7474
, text
7575
default-language: Haskell2010
7676
if flag(development)
77-
ghc-options: -Werror -fplugin=SourceConstraints
78-
build-depends:
79-
source-constraints
77+
ghc-options: -Werror
8078
else
8179
ghc-options: -Wwarn
80+
if impl(ghc < 9.5)
81+
ghc-options: -fplugin=SourceConstraints
82+
build-depends:
83+
source-constraints
8284

8385
test-suite readme
8486
type: exitcode-stdio-1.0
@@ -122,11 +124,13 @@ test-suite readme
122124
, text
123125
default-language: Haskell2010
124126
if flag(development)
125-
ghc-options: -Werror -fplugin=SourceConstraints
126-
build-depends:
127-
source-constraints
127+
ghc-options: -Werror
128128
else
129129
ghc-options: -Wwarn
130+
if impl(ghc < 9.5)
131+
ghc-options: -fplugin=SourceConstraints
132+
build-depends:
133+
source-constraints
130134

131135
test-suite test
132136
type: exitcode-stdio-1.0
@@ -181,8 +185,10 @@ test-suite test
181185
, type-spec
182186
default-language: Haskell2010
183187
if flag(development)
184-
ghc-options: -Werror -fplugin=SourceConstraints
185-
build-depends:
186-
source-constraints
188+
ghc-options: -Werror
187189
else
188190
ghc-options: -Wwarn
191+
if impl(ghc < 9.5)
192+
ghc-options: -fplugin=SourceConstraints
193+
build-depends:
194+
source-constraints

cbt/cbt.cabal

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ library
101101
, uuid >=1.3
102102
default-language: Haskell2010
103103
if flag(development)
104-
ghc-options: -Werror -fplugin=SourceConstraints
105-
build-depends:
106-
source-constraints
104+
ghc-options: -Werror
107105
else
108106
ghc-options: -Wwarn
107+
if impl(ghc < 9.5)
108+
ghc-options: -fplugin=SourceConstraints
109+
build-depends:
110+
source-constraints
109111

110112
test-suite test
111113
type: exitcode-stdio-1.0
@@ -174,8 +176,10 @@ test-suite test
174176
, uuid >=1.3
175177
default-language: Haskell2010
176178
if flag(development)
177-
ghc-options: -Werror -fplugin=SourceConstraints
178-
build-depends:
179-
source-constraints
179+
ghc-options: -Werror
180180
else
181181
ghc-options: -Wwarn
182+
if impl(ghc < 9.5)
183+
ghc-options: -fplugin=SourceConstraints
184+
build-depends:
185+
source-constraints

cli-utils/cli-utils.cabal

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22

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

@@ -67,11 +67,13 @@ library
6767
, optparse-applicative
6868
default-language: Haskell2010
6969
if flag(development)
70-
ghc-options: -Werror -fplugin=SourceConstraints
71-
build-depends:
72-
source-constraints
70+
ghc-options: -Werror
7371
else
7472
ghc-options: -Wwarn
73+
if impl(ghc < 9.5)
74+
ghc-options: -fplugin=SourceConstraints
75+
build-depends:
76+
source-constraints
7577

7678
test-suite test
7779
type: exitcode-stdio-1.0
@@ -118,8 +120,10 @@ test-suite test
118120
, tasty
119121
default-language: Haskell2010
120122
if flag(development)
121-
ghc-options: -Werror -fplugin=SourceConstraints
122-
build-depends:
123-
source-constraints
123+
ghc-options: -Werror
124124
else
125125
ghc-options: -Wwarn
126+
if impl(ghc < 9.5)
127+
ghc-options: -fplugin=SourceConstraints
128+
build-depends:
129+
source-constraints

common/package.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
when:
1313
- condition: flag(development)
1414
then:
15-
ghc-options:
16-
- -Werror
17-
- -fplugin=SourceConstraints
18-
dependencies:
19-
- source-constraints
15+
ghc-options: -Werror
2016
else:
2117
ghc-options: -Wwarn
2218

19+
# GHC 9.6 currently doesn't play nice with plugins when stack
20+
# https://github.com/commercialhaskell/stack/issues/6251
21+
- condition: impl(ghc < 9.5)
22+
ghc-options: -fplugin=SourceConstraints
23+
dependencies: source-constraints
24+
2325
ghc-options:
2426
- -Wall
2527
- -Wcompat

conversions/conversions.cabal

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22

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

@@ -75,11 +75,13 @@ library
7575
, text
7676
default-language: Haskell2010
7777
if flag(development)
78-
ghc-options: -Werror -fplugin=SourceConstraints
79-
build-depends:
80-
source-constraints
78+
ghc-options: -Werror
8179
else
8280
ghc-options: -Wwarn
81+
if impl(ghc < 9.5)
82+
ghc-options: -fplugin=SourceConstraints
83+
build-depends:
84+
source-constraints
8385

8486
test-suite test
8587
type: exitcode-stdio-1.0
@@ -131,8 +133,10 @@ test-suite test
131133
, text
132134
default-language: Haskell2010
133135
if flag(development)
134-
ghc-options: -Werror -fplugin=SourceConstraints
135-
build-depends:
136-
source-constraints
136+
ghc-options: -Werror
137137
else
138138
ghc-options: -Wwarn
139+
if impl(ghc < 9.5)
140+
ghc-options: -fplugin=SourceConstraints
141+
build-depends:
142+
source-constraints

dbt/dbt.cabal

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ library
9797
, unliftio-core >=0.2
9898
default-language: Haskell2010
9999
if flag(development)
100-
ghc-options: -Werror -fplugin=SourceConstraints
101-
build-depends:
102-
source-constraints
100+
ghc-options: -Werror
103101
else
104102
ghc-options: -Wwarn
103+
if impl(ghc < 9.5)
104+
ghc-options: -fplugin=SourceConstraints
105+
build-depends:
106+
source-constraints
105107

106108
executable dbt
107109
main-is: Main.hs
@@ -167,11 +169,13 @@ executable dbt
167169
, unliftio-core >=0.2
168170
default-language: Haskell2010
169171
if flag(development)
170-
ghc-options: -Werror -fplugin=SourceConstraints
171-
build-depends:
172-
source-constraints
172+
ghc-options: -Werror
173173
else
174174
ghc-options: -Wwarn
175+
if impl(ghc < 9.5)
176+
ghc-options: -fplugin=SourceConstraints
177+
build-depends:
178+
source-constraints
175179
if flag(development)
176180
buildable: True
177181
else
@@ -246,8 +250,10 @@ test-suite test
246250
, unliftio-core >=0.2
247251
default-language: Haskell2010
248252
if flag(development)
249-
ghc-options: -Werror -fplugin=SourceConstraints
250-
build-depends:
251-
source-constraints
253+
ghc-options: -Werror
252254
else
253255
ghc-options: -Wwarn
256+
if impl(ghc < 9.5)
257+
ghc-options: -fplugin=SourceConstraints
258+
build-depends:
259+
source-constraints

0 commit comments

Comments
 (0)