mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
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
This commit is contained in:
parent
cfd2f54eab
commit
f28b7cdfd8
@ -1,12 +1,21 @@
|
||||
-- This configuration is used by `dev.sh graphql-engine --optimized` and is
|
||||
-- also a good choice for running a local optimized build
|
||||
--
|
||||
-- !!!IMPORTANT!!!:
|
||||
-- if you modify this you need to copy-paste the change in all the other dev-sh
|
||||
-- files which contain: "START dev-sh-optimized.project.local"
|
||||
|
||||
-- This requires cabal-install >=3.8
|
||||
import: cabal/dev-sh.project.local
|
||||
import: dev-sh.project.local
|
||||
|
||||
---- (reminder: top-level means apply these to all local packages)
|
||||
flags: +optimize-hasura
|
||||
-- be faster:
|
||||
documentation: false
|
||||
-- coverage inhibits performance:
|
||||
coverage: false
|
||||
|
||||
-- coverage inhibits performance. NOTE: we can't just put this at the top level
|
||||
-- to override, since it seems package-specific configuration takes precedence...
|
||||
package graphql-engine
|
||||
coverage: false
|
||||
package graphql-engine-pro
|
||||
coverage: false
|
||||
|
@ -6,7 +6,25 @@
|
||||
-- also we may need to wait until further work on compressing IPE info lands.
|
||||
-- (Likewise we might want to always link with -eventlog)
|
||||
|
||||
import: cabal/dev-sh-optimized.project.local
|
||||
-- Formerly we had:
|
||||
-- import: cabal/dev-sh-optimized.project.local
|
||||
-- ...but cabal 3.10 broke it. See: TODO
|
||||
-- ...so now we need to copy-paste that configuration here to avoid import chains
|
||||
-- -------------------------- START dev-sh-optimized.project.local ------------------------------------
|
||||
import: dev-sh.project.local
|
||||
|
||||
---- (reminder: top-level means apply these to all local packages)
|
||||
flags: +optimize-hasura
|
||||
-- be faster:
|
||||
documentation: false
|
||||
|
||||
-- coverage inhibits performance. NOTE: we can't just put this at the top level
|
||||
-- to override, since it seems package-specific configuration takes precedence...
|
||||
package graphql-engine
|
||||
coverage: false
|
||||
package graphql-engine-pro
|
||||
coverage: false
|
||||
-- -------------------------- END dev-sh-optimized.project.local ------------------------------------
|
||||
|
||||
-- apply these to all LOCAL packages
|
||||
-- TODO would be nice to refactor other dev-sh.project.local to use program-options' as well (and force cabal 3.8)
|
||||
@ -15,9 +33,3 @@ program-options
|
||||
-- For each module, STG will be dumped to:
|
||||
-- dist-newstyle/**/*.dump-stg-final
|
||||
ghc-options: -ddump-stg-final -ddump-to-file
|
||||
|
||||
package graphql-engine
|
||||
ghc-options: -eventlog
|
||||
|
||||
package graphql-engine-pro
|
||||
ghc-options: -eventlog
|
||||
|
@ -3,7 +3,25 @@
|
||||
--
|
||||
-- run with e.g. `+RTS -r outfilepath`
|
||||
|
||||
import: cabal/dev-sh-optimized.project.local
|
||||
-- Formerly we had:
|
||||
-- import: cabal/dev-sh-optimized.project.local
|
||||
-- ...but cabal 3.10 broke it. See: TODO
|
||||
-- ...so now we need to copy-paste that configuration here to avoid import chains
|
||||
-- -------------------------- START dev-sh-optimized.project.local ------------------------------------
|
||||
import: dev-sh.project.local
|
||||
|
||||
---- (reminder: top-level means apply these to all local packages)
|
||||
flags: +optimize-hasura
|
||||
-- be faster:
|
||||
documentation: false
|
||||
|
||||
-- coverage inhibits performance. NOTE: we can't just put this at the top level
|
||||
-- to override, since it seems package-specific configuration takes precedence...
|
||||
package graphql-engine
|
||||
coverage: false
|
||||
package graphql-engine-pro
|
||||
coverage: false
|
||||
-- -------------------------- END dev-sh-optimized.project.local ------------------------------------
|
||||
|
||||
-- Apply to all local packages (consider an additional mode that recompiles libraries too)
|
||||
program-options
|
||||
|
@ -1,6 +1,25 @@
|
||||
-- Enable lower distortion time profiling, powers `dev.sh graphql-engine --prof-time`
|
||||
-- See: https://downloads.haskell.org/ghc/latest/docs/users_guide/profiling.html?highlight=fprof%20late#ghc-flag--fprof-late
|
||||
import: cabal/dev-sh-optimized.project.local
|
||||
|
||||
-- Formerly we had:
|
||||
-- import: cabal/dev-sh-optimized.project.local
|
||||
-- ...but cabal 3.10 broke it. See: TODO
|
||||
-- ...so now we need to copy-paste that configuration here to avoid import chains
|
||||
-- -------------------------- START dev-sh-optimized.project.local ------------------------------------
|
||||
import: dev-sh.project.local
|
||||
|
||||
---- (reminder: top-level means apply these to all local packages)
|
||||
flags: +optimize-hasura
|
||||
-- be faster:
|
||||
documentation: false
|
||||
|
||||
-- coverage inhibits performance. NOTE: we can't just put this at the top level
|
||||
-- to override, since it seems package-specific configuration takes precedence...
|
||||
package graphql-engine
|
||||
coverage: false
|
||||
package graphql-engine-pro
|
||||
coverage: false
|
||||
-- -------------------------- END dev-sh-optimized.project.local ------------------------------------
|
||||
|
||||
profiling: True
|
||||
flags: +profiling
|
||||
|
@ -81,6 +81,12 @@ EOL
|
||||
exit 1
|
||||
}
|
||||
|
||||
# See: TODO
|
||||
cabal --version | grep -q ' 3\.10' || {
|
||||
echo_error "Please use cabal 3.10, as cabal broke 'import' and we can't make it compatible"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# The default configuration this script expects. May be overridden depending on
|
||||
# flags passed to subcommands, or this can be edited for one-off tests:
|
||||
CABAL_PROJECT_FILE=cabal/dev-sh.project
|
||||
|
Loading…
Reference in New Issue
Block a user