mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
09e328223e
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
101 lines
3.5 KiB
Plaintext
101 lines
3.5 KiB
Plaintext
-- This is the local cabal configuration file used by the `scripts/dev.sh`
|
|
-- development script, which uses `... --project-file=cabal/dev-sh.project`
|
|
-- 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
|
|
|
|
-- For compile-time performance (see cabal.project.ci.local):
|
|
ghc-options:
|
|
-- We compile with package-level parallelism, so just use a small amount
|
|
-- of module-level parallelism for dependencies:
|
|
-j2
|
|
+RTS -A64m -n2m -RTS
|
|
|
|
-- Modify this to '+optimize-hasura' to enable optimizations. Be sure also to comment
|
|
-- 'coverage: true' below for full prod performance.
|
|
--
|
|
-- NOTE: new-build may report a misleading 'Build profile: -O1'
|
|
-- See:https://github.com/haskell/cabal/issues/6221
|
|
flags: -optimize-hasura
|
|
|
|
package graphql-engine
|
|
documentation: false
|
|
-- 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
|
|
-- For compile-time performance (see cabal.project.ci.local):
|
|
ghc-options: -j
|
|
-- 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
|
|
|
|
package test-harness
|
|
documentation: false
|
|
coverage: true
|
|
ghc-options: -Werror
|
|
ghc-options: -j
|
|
-- See "package graphql-engine" for more information
|
|
executable-dynamic: True
|
|
library-vanilla: False
|
|
|
|
package api-tests
|
|
documentation: false
|
|
coverage: true
|
|
ghc-options: -Werror
|
|
ghc-options: -j
|
|
-- See "package graphql-engine" for more information
|
|
executable-dynamic: True
|
|
library-vanilla: False
|
|
|
|
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
|
|
|