forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cabal.project.dev-sh.local
39 lines (36 loc) · 1.91 KB
/
cabal.project.dev-sh.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- This is the local cabal configuration file used by the 'scripts/dev.sh'
-- development script, which uses `... --project-file=cabal.project.dev-sh`
-- which in turn consults this file.
--
-- You can temporarily override values here rather than modifying 'dev.sh'
-- during development (although that might break certain things).
package *
documentation: true
-- 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
package graphql-engine
-- NOTE: this seems to work so long as there is no 'ghc-options: -O2' in the cabal file,
-- but new-build will report 'Build profile: -O1' for some reason.
-- See:https://github.com/haskell/cabal/issues/6221
optimization: 0
documentation: false
flags: +developer
-- 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
-- to match CI:
ghc-options: -Werror
-- 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