Commit Graph

12 Commits

Author SHA1 Message Date
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