Commit Graph

19 Commits

Author SHA1 Message Date
Brandon Simmons
f28b7cdfd8 Jberryman/07 11 2023 new cabal workarounds
some dev.sh cabal project file fixes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9842
GitOrigin-RevId: a3a095f9ac7739ff94514d53222818f400269f8a
2023-07-12 08:30:35 +00:00
Samir Talwar
4049fbd728 server: Use program-options from Cabal 3.8 to spread ghc-options everywhere.
This makes it far easier to add new packages without having to add GHC flags everywhere.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9684
GitOrigin-RevId: 1470b618a7e6582ad5053680c89df0c81920402e
2023-06-27 15:50:41 +00:00
Brandon Simmons
440a8664de server: Upgrade the HGE server to GHC 9.4.5
Upgrade to GHC 9.4.5, and update any tests.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8954
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: 5261126777cb478567ea471c4bf5441bc345ea0d
2023-06-06 13:29:30 +00:00
Brandon Martin
5b27561caa Update docker compose files, add graphql-data-connector
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8804
GitOrigin-RevId: 37d4ac91691857cd426bab550e2091b2b0311833
2023-04-25 14:42:46 +00:00
Brandon Simmons
7066b52777 dev.sh: support graphql-engine-pro
So you can do:

```
$ HASURA_GRAPHQL_EE_LICENSE_KEY=... scripts/dev.sh graphql-engine-pro
```

along with the `--prof-*` modes etc.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8894
GitOrigin-RevId: 2257749b2936cbd3230beb23e774ac92989e2fbc
2023-04-25 10:54:30 +00:00
Auke Booij
f14b47cf42 chore(server): stricter GHC warnings for libraries
#7730 added some `package` stanzas to the Cabal project files so that we enable more GHC warnings.

#7761 recognized that these package stanzas used incorrect package names, and were therefore dysfunctional.

Simultaneously with that PR, #7758 renamed some of our Cabal packages, to the same ones used by #7730. However, it didn't change the names used by the package stanzas.

So finally, this reverts the names in the stanzas to the ones used by #7730 (and which are now correct).

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8275
GitOrigin-RevId: 1a3748ed79d1fa699c5e543b1af16f359c35c028
2023-03-14 17:01:46 +00:00
Antoine Leblanc
a0a2492fe3 add -fsolve-constant-dicts to local environment
## Description

When working locally, we often run into [ghc#16932](https://gitlab.haskell.org/ghc/ghc/-/issues/16932): redundant constraints warnings do not fire, because optimizations are disabled, but they end up making the build fail on CI where optimizations are enabled. This PR enables `-fsolve-constant-dicts` in the local environment, which guarantees that this warning will always fire locally. This doesn't seem to have a measurable impact on compilation time or memory use, as far as i could tell.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8305
GitOrigin-RevId: 0eac572464a3c6861be8b8c176ea9257f14e4226
2023-03-14 15:41:27 +00:00
kodiakhq[bot]
b01d3a45de server: dev build modes
Add some configurations for modern profiling modes, and integration into dev.sh

These require cabal 3.8 due to the use of `import`

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7671
GitOrigin-RevId: f793f64105cfd99fb51b247fa8bc050f6d4bd23e
2023-02-08 22:43:00 +00:00
Auke Booij
aeff6e162a server: fix cabal and warnings for arrows related packages
#7730 added `package` stanzas for all our internal Haskell libraries, so that `-Werror` was switched on for all of them. However, #7534 was developed simultaneously, and merged shortly after, so that we missed `package` stanzas for `hasura-incremental` and `arrows-extra`. Then #7761 added one for `hasura-incremental`. This PR fixes one warning for a test suite there, and adds the missing `package` stanza for `arrows-extra`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7770
GitOrigin-RevId: 5f5c3fb5d4852c88ed2e14a3fa83fe264aec895b
2023-02-02 19:53:13 +00:00
Antoine Leblanc
1fe7fe43b8 Fix all warnings in internal libraries and enable -WError everywhere
### Description

This PR:
- fixes the package names in dev-sh.project.local (the config was using the names of the folders, not the names of the packages)
- adds similar options to CI: we also want to build with CI and in parallel there
- fixes all warnings

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7761
GitOrigin-RevId: ef1d78db8c94f5e74c18443aa517544f6a6f5a10
2023-02-01 23:32:19 +00:00
Auke Booij
a5325d6aea server: fix cabal files; apply ghc warnings more strictly
- In a previous PR we made more use of `common` stanzas, but these require `cabal-version: 2.2` (so some of those stanzas were not functional before this PR). This just bumps the `cabal-version`s straight to 3.6, which is the latest version we support in CI, where we build with cabal 3.6.
- This `cabal-version` upgrade required fixing a few `license` fields, from `BSD3` to `BSD-3-Clause`. I've also added `default-language` fields where appropriate, although this is perhaps optional.
- Using cabal's [syntax for applying options to all _local_ packages](https://cabal.readthedocs.io/en/3.8/cabal-project.html#package-configuration-options), we unify the cabal configuration, and apply `-Werror` to all local packages, which wasn't the case until now.
- Applying `-Werror` to all local packages required a few additional exceptions to the warnings that were switched on in hasura/graphql-engine-mono#7614.
- Deleted SCM links to the original pool library.

Overall, the effect of this PR is:
- more warnings
- stricter compilation
- ~~less cabal configuration~~

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7730
GitOrigin-RevId: 592e9e46d103bcc8726df5b745306bd9f77f7efc
2023-01-31 18:25:42 +00:00
Antoine Leblanc
128f8ca41e Disable documentation by default
### Description

Disable building documentation by default in the local build config.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7695
GitOrigin-RevId: c5c61e7ad7890ebac87365ab68ea7496c89cef3e
2023-01-27 15:13:03 +00:00
kodiakhq[bot]
26ce8ff768 server: -O1 + -funfolding-use-threshold=640, for memory residency
...and keep binary size down using `--gc-sections` (supported by all major linkers). Stripped size after this PR is `85.3 Mb` down from `121 Mb` on `main`.

This compliments Auke's recent work (though there is some overlap). See: https://github.com/hasura/graphql-engine-mono/pull/7033#issuecomment-1326673632

Old experiments, for reference:
https://github.com/hasura/graphql-engine-mono/pull/6605
https://github.com/hasura/graphql-engine-mono/pull/6606
https://github.com/hasura/graphql-engine-mono/pull/6589

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7079
GitOrigin-RevId: 0b0d86730fb959d6249bd17a87e39af12ef71261
2022-11-30 17:05:15 +00:00
Auke Booij
09e328223e Fix build errors related to dynamic building
When building under the `dev.sh`-adjusted `cabal.local` files, it's not possible to build all Haskell components:
```shell
$ cabal build all all:tests all:benchmarks
[... snipped ...]
[1 of 1] Compiling Harness.GraphqlEnginePro ( src/Harness/GraphqlEnginePro.hs, /home/auke/graphql-engine-mono/dist-newstyle/build/x86_64-linux/ghc-9.2.5/test-harness-pro-0.1.0.0/opt/build/Harness/GraphqlEnginePro.o, /home/auke/graphql-engine-mono/dist-newstyle/build/x86_64-linux/ghc-9.2.5/test-harness-pro-0.1.0.0/opt/build/Harness/GraphqlEnginePro.dyn_o )

src/Harness/GraphqlEnginePro.hs:13:1: error:
    Could not find module 'Control.Concurrent.Extended'
    There are files missing in the 'graphql-engine-1.0.0' package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
13 | import Control.Concurrent.Extended (sleep)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Harness/GraphqlEnginePro.hs:14:1: error:
    Could not find module 'Data.Environment'
    There are files missing in the 'graphql-engine-1.0.0' package,
    try running 'ghc-pkg check'.
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
14 | import Data.Environment qualified as Env
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6962
GitOrigin-RevId: dd7992dfa4e5b999f9b3d39389121bde1465965d
2022-11-21 15:07:53 +00:00
Daniel Harvey
daf55101f4 tests: force remove BigQuery datasets and don't bother manually removing tables
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6473
GitOrigin-RevId: 15cefa76cfd472f4197ae965970dfbc203f694a4
2022-10-24 16:54:35 +00:00
Tom Harding
f05f746b94 Extract the test harness from the Hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6095
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 51693f7324e62e201a2bdc701255cf6c730745e2
2022-10-04 08:31:26 +00:00
kodiakhq[bot]
d8b595575d server: more GHC 9.2 changes compatible with 8.10 (#3550)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4968
GitOrigin-RevId: 1175b2fcc90e0436c99da7fa58d317a49c7704d4
2022-07-07 16:51:18 +00:00
Brandon Simmons
b704192268 server: GHC 9.2 changes compatible with 8.10 (#3550)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4841
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
GitOrigin-RevId: ce47b1290fefb07f3f800c6c62120437c02086e5
2022-06-25 22:09:05 +00:00
jkachmar
6720aef26f server: Clean up Cabal project files
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4105
GitOrigin-RevId: 423eecf04061ca8d5ee036a84ee6792036a149e4
2022-04-07 07:16:12 +00:00