2022-04-07 10:15:11 +03:00
|
|
|
-- This is the local cabal configuration file used by the `scripts/dev.sh`
|
|
|
|
-- development script, which uses `... --project-file=cabal/dev-sh.project`
|
2020-01-24 02:22:21 +03:00
|
|
|
-- which in turn consults this file.
|
|
|
|
--
|
|
|
|
-- You can temporarily override values here rather than modifying 'dev.sh'
|
2021-01-09 00:31:36 +03:00
|
|
|
-- during development (although that might break certain things).
|
2020-01-24 02:22:21 +03:00
|
|
|
|
|
|
|
package *
|
2020-04-03 11:24:51 +03:00
|
|
|
-- build with DWARF support. This may not be very useful yet, but we want
|
|
|
|
-- to be able to experiment with it, and turning it from off to on requires
|
|
|
|
-- a massive rebuild. To start, see:
|
|
|
|
-- https://www.haskell.org/ghc/blog/20200403-dwarf-1.html
|
|
|
|
debug-info: 2
|
2021-12-10 19:21:42 +03:00
|
|
|
|
|
|
|
-- For compile-time performance (see cabal.project.ci.local):
|
|
|
|
ghc-options:
|
2022-11-21 18:06:36 +03:00
|
|
|
-- We compile with package-level parallelism, so just use a small amount
|
2021-12-10 19:21:42 +03:00
|
|
|
-- of module-level parallelism for dependencies:
|
|
|
|
-j2
|
|
|
|
+RTS -A64m -n2m -RTS
|
2022-11-21 18:06:36 +03:00
|
|
|
|
2023-03-14 18:39:39 +03:00
|
|
|
-- This guarantees that -Wredundant-contraints will properly fire, even with
|
|
|
|
-- optimizations disabled. See https://gitlab.haskell.org/ghc/ghc/-/issues/16932
|
|
|
|
ghc-options: -fsolve-constant-dicts
|
|
|
|
|
2023-06-27 18:49:07 +03:00
|
|
|
-- Set common options for local libraries
|
|
|
|
program-options
|
|
|
|
ghc-options: -j -Werror
|
|
|
|
|
2021-10-20 19:14:00 +03:00
|
|
|
-- NOTE: new-build may report a misleading 'Build profile: -O1'
|
|
|
|
-- See:https://github.com/haskell/cabal/issues/6221
|
|
|
|
flags: -optimize-hasura
|
2020-01-24 02:22:21 +03:00
|
|
|
|
|
|
|
package graphql-engine
|
|
|
|
-- NOTE: 'cabal new-build --enable-coverage' seems to rebuild all deps with coverage
|
|
|
|
-- which is not what we originally wanted. But building the test modules
|
|
|
|
-- themselves with coverage is actually nice for validation.
|
|
|
|
coverage: true
|
2021-08-11 07:18:40 +03:00
|
|
|
|
2023-04-25 13:52:39 +03:00
|
|
|
package graphql-engine-pro
|
|
|
|
-- NOTE: 'cabal new-build --enable-coverage' seems to rebuild all deps with coverage
|
|
|
|
-- which is not what we originally wanted. But building the test modules
|
|
|
|
-- themselves with coverage is actually nice for validation.
|
|
|
|
coverage: true
|
|
|
|
|
2023-01-31 21:23:52 +03:00
|
|
|
-- By default GHC is dynamically linked, so to run TemplateHaskell you need dynamic versions of
|
|
|
|
-- libraries. But, also by default, cabal links executables statically, which requires static
|
|
|
|
-- versions of the libraries. Therefore, by default, cabal builds with -dynamic-too to generate
|
|
|
|
-- static and dynamic versions of all object files.
|
|
|
|
-- Setting executable-dynamic: True forces cabal to build a dynamic executable; but it's not
|
|
|
|
-- enough on its own: since library-vanilla defaults to True, cabal would still build a static
|
|
|
|
-- library. With those two flags together, we can finally only build one version of the library,
|
|
|
|
-- which substentially improves compilation time.
|
|
|
|
executable-dynamic: True
|
|
|
|
library-vanilla: False
|
|
|
|
|
|
|
|
-- These packages link back into our fork of resource-pool, hence we need to
|
|
|
|
-- disable a statically linked library build
|
|
|
|
package hedis
|
2022-10-04 11:30:09 +03:00
|
|
|
library-vanilla: False
|
2023-01-31 21:23:52 +03:00
|
|
|
package Spock
|
|
|
|
library-vanilla: False
|
|
|
|
package hasql-pool
|
|
|
|
library-vanilla: False
|
|
|
|
|
2022-10-24 19:53:15 +03:00
|
|
|
package mysql
|
|
|
|
extra-include-dirs:
|
|
|
|
/opt/homebrew/opt/openssl/include
|
|
|
|
/opt/homebrew/opt/mysql-client@5.7/include
|
|
|
|
extra-lib-dirs:
|
|
|
|
/opt/homebrew/opt/openssl/lib
|
|
|
|
/opt/homebrew/opt/mysql-client@5.7/lib
|
|
|
|
|
|
|
|
package odbc
|
|
|
|
extra-include-dirs: /opt/homebrew/opt/unixodbc/include
|
|
|
|
extra-lib-dirs: /opt/homebrew/opt/unixodbc/lib
|
|
|
|
|
|
|
|
package pcre-light
|
|
|
|
extra-include-dirs: /opt/homebrew/opt/pcre/include
|
|
|
|
extra-lib-dirs: /opt/homebrew/opt/pcre/lib
|
|
|
|
|
|
|
|
package postgresql-libpq
|
|
|
|
extra-include-dirs:
|
|
|
|
/opt/homebrew/opt/libpq/include
|
|
|
|
/opt/homebrew/opt/openssl/include
|
|
|
|
extra-lib-dirs:
|
|
|
|
/opt/homebrew/opt/libpq/lib
|
|
|
|
/opt/homebrew/opt/openssl/lib
|
|
|
|
|
|
|
|
package pg-client
|
|
|
|
extra-include-dirs:
|
|
|
|
/opt/homebrew/opt/libpq/include
|
|
|
|
/opt/homebrew/opt/openssl/include
|
|
|
|
extra-lib-dirs:
|
|
|
|
/opt/homebrew/opt/libpq/lib
|
|
|
|
/opt/homebrew/opt/openssl/lib
|
|
|
|
|