* Don't indent first line of configuration parser error messages
configurator-pg returns multi-line errors now. Alternatively,
we could indent all the lines.
Specifically, allow base 4.13 which ships with GHC 8.8, as well
as several dependency updates including hasql-transaction 1.0,
swagger 2.5 and warp 3.3.
The style check was failing due to a changed stack.yaml.lock file.
(That file still should be updated, but this is not where it should
cause a failure.)
Two changes:
- tags are now an insert-ordered hashset
- type_ .~ -> type_ ?~ with some magic type inference
This also updates stack.yaml to the newest GHC 8.6 LTS release.
See also https://github.com/haskell/cabal/issues/4739.
/Users/travis/build/PostgREST/postgrest/<built-in>:15:10: error:
error: non-portable path to file '".stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/PostgREST/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
".stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/PostgREST/autogen/cabal_macros.h"
* 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).