Skip to content

Commit a7e07f5

Browse files
authored
Merge pull request #160 from haskell-graphql/156-ghc-8.2
Support GHC 8.2 and 8.0
2 parents 39bdc75 + 3ac97e5 commit a7e07f5

File tree

8 files changed

+66
-27
lines changed

8 files changed

+66
-27
lines changed

.circleci/config.yml

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
version: 2
22
jobs:
3-
build:
3+
build-8.0:
44
docker:
5-
# GHC 8.0.2 is the lowest (and so far, only) supported compiler version.
5+
# GHC 8.0.2 is the lowest supported compiler version.
66
- image: fpco/stack-build:lts-9.21
77
steps:
88
- checkout
99
- restore_cache:
1010
keys:
11-
- stack-ghc-{{ checksum "stack.yaml" }}
11+
- stack-ghc-{{ checksum "stack-8.0.yaml" }}
1212
- restore_cache:
1313
keys:
1414
- stack-deps-{{ checksum "package.yaml" }}
1515
- run:
1616
name: Set up Stack
17-
command: stack setup --no-terminal --no-reinstall
17+
command: STACK_YAML=stack-8.0.yaml stack setup --no-terminal --no-reinstall
1818
- save_cache:
19-
key: stack-ghc-{{ checksum "stack.yaml" }}
19+
key: stack-ghc-{{ checksum "stack-8.0.yaml" }}
2020
paths:
2121
- /root/.stack
2222
- run:
2323
name: Install dependencies
24-
command: stack build --skip-ghc-check --no-terminal --test --only-dependencies
24+
command: STACK_YAML=stack-8.0.yaml stack build --skip-ghc-check --no-terminal --test --only-dependencies
2525
- save_cache:
2626
key: stack-deps-{{ checksum "package.yaml" }}
2727
paths:
@@ -32,4 +32,44 @@ jobs:
3232
# *don't* build with -Werror on Hackage as that is strongly
3333
# discouraged.
3434
name: Tests
35-
command: stack test --skip-ghc-check --no-terminal --pedantic
35+
command: STACK_YAML=stack-8.0.yaml stack test --skip-ghc-check --no-terminal --pedantic
36+
build-8.2:
37+
docker:
38+
# Latest stackage LTS for GHC 8.2 at time of writing
39+
- image: fpco/stack-build:lts-10.4
40+
steps:
41+
- checkout
42+
- restore_cache:
43+
keys:
44+
- stack-ghc-{{ checksum "stack-8.2.yaml" }}
45+
- restore_cache:
46+
keys:
47+
- stack-deps-{{ checksum "package.yaml" }}
48+
- run:
49+
name: Set up Stack
50+
command: STACK_YAML=stack-8.2.yaml stack setup --no-terminal --no-reinstall
51+
- save_cache:
52+
key: stack-ghc-{{ checksum "stack-8.2.yaml" }}
53+
paths:
54+
- /root/.stack
55+
- run:
56+
name: Install dependencies
57+
command: STACK_YAML=stack-8.2.yaml stack build --skip-ghc-check --no-terminal --test --only-dependencies
58+
- save_cache:
59+
key: stack-deps-{{ checksum "package.yaml" }}
60+
paths:
61+
- /root/.stack
62+
- .stack-work
63+
- run:
64+
# Build with --pedantic here to avoid introducing warnings. We
65+
# *don't* build with -Werror on Hackage as that is strongly
66+
# discouraged.
67+
name: Tests
68+
command: STACK_YAML=stack-8.2.yaml stack test --skip-ghc-check --no-terminal --pedantic
69+
70+
workflows:
71+
version: 2
72+
build_all_versions:
73+
jobs:
74+
- build-8.0
75+
- build-8.2

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Breaking changes
1111
* ``Enum`` handlers are now monadic (see `#118`_)
1212
* restrict usage to Protolude 0.2.1 and later
1313

14+
Improvements
15+
------------
16+
17+
* Now support GHC 8.2 as well as 8.0.2 and later
18+
1419
.. _`#118`: https://github.com/jml/graphql-api/issues/118
1520

1621

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ run :: Text -> IO Response
5656
run = interpretAnonymousQuery @Hello hello
5757
```
5858

59-
We require GHC 8.0.2 or later for features like the `@Hello` type application, and for certain bug fixes.
59+
We require GHC 8.0.2 or later for features like the `@Hello` type application, and for certain bug fixes. We also support GHC 8.2.
6060

6161
With the code above we can now run a query:
6262

graphql-api.cabal

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
-- see: https://github.com/sol/hpack
44
--
5-
-- hash: 39113cf0b3911f4704bf80289a842f6a6cad623940e0146c3af99de590799257
5+
-- hash: 78a5a4f0c4375f8d03bffd738aeb76a00fdf535cd6bc2e07cdaa13de38b1e614
66

77
name: graphql-api
88
version: 0.2.0
@@ -65,9 +65,9 @@ library
6565

6666
test-suite graphql-api-doctests
6767
type: exitcode-stdio-1.0
68-
main-is: Doctests.hs
68+
main-is: Main.hs
6969
hs-source-dirs:
70-
tests
70+
tests/doctests
7171
default-extensions: NoImplicitPrelude OverloadedStrings RecordWildCards TypeApplications
7272
ghc-options: -Wall -fno-warn-redundant-constraints -threaded
7373
build-depends:
@@ -78,18 +78,6 @@ test-suite graphql-api-doctests
7878
, protolude >=0.2.1
7979
, transformers
8080
other-modules:
81-
ASTTests
82-
EndToEndTests
83-
EnumTests
84-
Examples.InputObject
85-
Examples.UnionExample
86-
ExampleSchema
87-
OrderedMapTests
88-
ResolverTests
89-
SchemaTests
90-
Spec
91-
ValidationTests
92-
ValueTests
9381
Paths_graphql_api
9482
default-language: Haskell2010
9583

@@ -117,7 +105,6 @@ test-suite graphql-api-tests
117105
, transformers
118106
other-modules:
119107
ASTTests
120-
Doctests
121108
EndToEndTests
122109
EnumTests
123110
Examples.InputObject

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ tests:
5151
- directory
5252

5353
graphql-api-doctests:
54-
main: Doctests.hs
54+
main: Main.hs
5555
ghc-options: -threaded
56-
source-dirs: tests
56+
source-dirs: tests/doctests
5757
dependencies:
5858
- doctest
5959

stack.yaml renamed to stack-8.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GHC 8.0.2 is the lowest (and currently, only) supported compiler version.
1+
# GHC 8.0.2 is the lowest supported compiler version.
22
resolver: lts-9.21
33

44
packages:

stack-8.2.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LTS 10.4 is the latest LTS that supports GHC 8.2 at the time of writing.
2+
resolver: lts-10.4
3+
4+
packages:
5+
- "."
6+
- "./docs/source/tutorial"
7+
- "./graphql-wai"
File renamed without changes.

0 commit comments

Comments
 (0)