* Update stack.yaml to lts-12.26 (GHC 8.4.4) with simplified nix config
(On GHC 8.6.5, profiled build was exiting with:
-- While building package postgrest-5.2.0 using:
/home/circleci/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.4.0.1 build lib:postgrest exe:postgrest --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure (-9) (THIS MAY INDICATE OUT OF MEMORY)
Exited with code 1)
* stack.yaml: Add postgresql to nix packages
* Relax some cabal upper bounds
Primarily based on building against GHC 8.6.5 with stackage lts-13.23.
* Add swagger2 upper bound
With swagger2 2.4, we get a number of errors like the following:
src/PostgREST/OpenAPI.hs:58:11: error:
• Couldn't match type ‘Maybe
(SwaggerType 'Data.Swagger.Internal.SwaggerKindSchema)’
with ‘SwaggerType 'Data.Swagger.Internal.SwaggerKindSchema’
arising from a functional dependency between:
constraint ‘HasType
Schema (SwaggerType 'Data.Swagger.Internal.SwaggerKindSchema)’
arising from a use of ‘type_’
instance ‘HasType
Schema
(Maybe (SwaggerType 'Data.Swagger.Internal.SwaggerKindSchema))’
at <no location info>
• In the first argument of ‘(.~)’, namely ‘type_’
In the second argument of ‘(&)’, namely ‘type_ .~ SwaggerObject’
In the first argument of ‘(&)’, namely
‘(mempty :: Schema) & description .~ tableDescription t
& type_ .~ SwaggerObject’
|
58 | & type_ .~ SwaggerObject
| ^^^^^
* Require base 4.9 / GHC 8.0.1
The DuplicateRecordFields extension, which is used here,
was introduced with GHC 8.0.
* Set cabal lower bounds
These are based on building against stackage lts-7.24 / GHC 8.0.1.
* Set cabal upper bounds, and truncate lower bounds
These are primarily based on the output of `cabal bounds`, with a good
build against GHC 8.6.5. Some test dependencies were missing; these
were filled out based on a build against stackage nightly.
Also I truncated lower bounds to the third level, since that is what
`cabal bounds` seems to suggest anyway.
* Format postgrest.cabal using stylish-cabal
* Sort build-depends list
* circleci: Update stack versions from 1.1.2 to 1.9.3.
* circleci: Don't try to install unused packdeps and cabal-install.
* memory-tests: Rely on `stack build` to have been called already.
This happens in the previous circleci step.
In particular, check buggy behavior around embedded quoted JSON
and Postgres versions, compare
https://www.postgresql.org/message-id/D6921B37-BD8E-4664-8D5F-DB3525765DCD%40vllmrt.net
This adds version-bounded tests for the handling of quoted JSON,
and a pending test that documents the assumption that Postgres >=10
intends to parse quoted JSON as a string (similar to how jsonb works
now).
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly