[cabal] more optimization flags refactoring

parent b3aca58c
Pipeline #5617 canceled with stages
...@@ -182,38 +182,8 @@ allow-older: * ...@@ -182,38 +182,8 @@ allow-older: *
allow-newer: * allow-newer: *
package gargantext package gargantext
ghc-options: -fwrite-ide-info -hiedir=".stack-work/hiedb" -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack ghc-options: -fwrite-ide-info -hiedir=".stack-work/hiedb"
package gargantext-admin
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-cli
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-db-obfuscation
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-import
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-init
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-invitations
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-phylo
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-server
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-upgrade
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package gargantext-graph
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
package hmatrix package hmatrix
ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack ghc-options: -O2 -fsimpl-tick-factor=10000 -fdicts-cheap -fdicts-strict -flate-dmd-anal -fno-state-hack
......
cabal-version: 2.0 cabal-version: 2.2
-- This file has been generated from package.yaml by hpack version 0.35.1. -- This file has been generated from package.yaml by hpack version 0.35.1.
-- --
...@@ -13,7 +13,7 @@ homepage: https://gargantext.org ...@@ -13,7 +13,7 @@ homepage: https://gargantext.org
author: Gargantext Team author: Gargantext Team
maintainer: team@gargantext.org maintainer: team@gargantext.org
copyright: Copyright: (c) 2017-Present: see git logs and README copyright: Copyright: (c) 2017-Present: see git logs and README
license: AGPL-3 license: AGPL-3.0-or-later
license-file: LICENSE license-file: LICENSE
build-type: Simple build-type: Simple
data-files: data-files:
...@@ -39,6 +39,37 @@ data-files: ...@@ -39,6 +39,37 @@ data-files:
gargantext-cors-settings.toml gargantext-cors-settings.toml
.clippy.dhall .clippy.dhall
-- common options
-- https://vrom911.github.io/blog/common-stanzas
common defaults
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
default-language: Haskell2010
build-depends:
base >=4.7 && <5
-- optimizations
common optimized
ghc-options:
-O2
-threaded
-rtsopts
-with-rtsopts=-N
-Wmissing-signatures
-- When enabled, it swaps the hashing algorithm -- When enabled, it swaps the hashing algorithm
-- with a quicker (and less secure) version, which -- with a quicker (and less secure) version, which
-- runs faster in tests. -- runs faster in tests.
...@@ -51,6 +82,8 @@ flag disable-db-obfuscation-executable ...@@ -51,6 +82,8 @@ flag disable-db-obfuscation-executable
manual: True manual: True
library library
import:
defaults
exposed-modules: exposed-modules:
Gargantext Gargantext
Gargantext.API Gargantext.API
...@@ -385,24 +418,9 @@ library ...@@ -385,24 +418,9 @@ library
Gargantext.Utils.Servant Gargantext.Utils.Servant
Gargantext.Utils.UTCTime Gargantext.Utils.UTCTime
Paths_gargantext Paths_gargantext
ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wmissing-signatures -Wunused-binds -Wunused-imports -Werror -freduction-depth=300 -fprint-potential-instances
hs-source-dirs: hs-source-dirs:
src src
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wmissing-signatures -Wunused-binds -Wunused-imports -Werror -freduction-depth=300 -fprint-potential-instances
if flag(test-crypto) if flag(test-crypto)
cpp-options: -DTEST_CRYPTO cpp-options: -DTEST_CRYPTO
build-depends: build-depends:
...@@ -423,7 +441,6 @@ library ...@@ -423,7 +441,6 @@ library
, async ^>= 2.2.4 , async ^>= 2.2.4
, attoparsec ^>= 0.13.2.5 , attoparsec ^>= 0.13.2.5
, auto-update ^>= 0.1.6 , auto-update ^>= 0.1.6
, base >=4.7 && <5
, base16-bytestring ^>= 1.0.2.0 , base16-bytestring ^>= 1.0.2.0
, base64-bytestring ^>= 1.1.0.0 , base64-bytestring ^>= 1.1.0.0
, bimap >= 0.5.0 , bimap >= 0.5.0
...@@ -599,65 +616,35 @@ library ...@@ -599,65 +616,35 @@ library
, yaml ^>= 0.11.8.0 , yaml ^>= 0.11.8.0
, zip ^>= 1.7.2 , zip ^>= 1.7.2
, zlib ^>= 0.6.2.3 , zlib ^>= 0.6.2.3
default-language: Haskell2010
executable gargantext-admin executable gargantext-admin
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-admin bin/gargantext-admin
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
base extra
, extra
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, text , text
default-language: Haskell2010
executable gargantext-cli executable gargantext-cli
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
CleanCsvCorpus CleanCsvCorpus
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-cli bin/gargantext-cli
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
aeson ^>= 1.5.6.0 aeson ^>= 1.5.6.0
, async ^>= 2.2.4 , async ^>= 2.2.4
, base ^>= 4.14.3.0
, bytestring ^>= 0.10.12.0 , bytestring ^>= 0.10.12.0
, cassava ^>= 0.5.2.0 , cassava ^>= 0.5.2.0
, containers ^>= 0.6.5.1 , containers ^>= 0.6.5.1
...@@ -672,161 +659,86 @@ executable gargantext-cli ...@@ -672,161 +659,86 @@ executable gargantext-cli
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
, unordered-containers ^>= 0.2.16.0 , unordered-containers ^>= 0.2.16.0
, vector ^>= 0.12.3.0 , vector ^>= 0.12.3.0
default-language: Haskell2010
executable gargantext-db-obfuscation executable gargantext-db-obfuscation
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-db-obfuscation bin/gargantext-db-obfuscation
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
if flag(disable-db-obfuscation-executable) if flag(disable-db-obfuscation-executable)
buildable: False buildable: False
else else
build-depends: build-depends:
base extra
, extra
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, optparse-simple , optparse-simple
, postgresql-simple ^>= 0.6.4 , postgresql-simple ^>= 0.6.4
, text , text
default-language: Haskell2010
executable gargantext-import executable gargantext-import
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-import bin/gargantext-import
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
base ^>= 4.14.3.0 extra ^>= 1.7.9
, extra ^>= 1.7.9
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, servant-server ^>= 0.18.3 , servant-server ^>= 0.18.3
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
default-language: Haskell2010
executable gargantext-init executable gargantext-init
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-init bin/gargantext-init
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
base ^>= 4.14.3.0 cron ^>= 0.7.0
, cron ^>= 0.7.0
, extra ^>= 1.7.9 , extra ^>= 1.7.9
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
default-language: Haskell2010
executable gargantext-invitations executable gargantext-invitations
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-invitations bin/gargantext-invitations
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
base ^>= 4.14.3.0 extra ^>= 1.7.9
, extra ^>= 1.7.9
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
default-language: Haskell2010
executable gargantext-phylo executable gargantext-phylo
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-phylo bin/gargantext-phylo
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
aeson ^>= 1.5.6.0 aeson ^>= 1.5.6.0
, async ^>= 2.2.4 , async ^>= 2.2.4
, base ^>= 4.14.3.0
, bytestring ^>= 0.10.12.0 , bytestring ^>= 0.10.12.0
, cassava ^>= 0.5.2.0 , cassava ^>= 0.5.2.0
, containers ^>= 0.6.5.1 , containers ^>= 0.6.5.1
...@@ -843,33 +755,18 @@ executable gargantext-phylo ...@@ -843,33 +755,18 @@ executable gargantext-phylo
, time ^>= 1.9.3 , time ^>= 1.9.3
, unordered-containers ^>= 0.2.16.0 , unordered-containers ^>= 0.2.16.0
, vector ^>= 0.7.3 , vector ^>= 0.7.3
default-language: Haskell2010
executable gargantext-server executable gargantext-server
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-server bin/gargantext-server
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -Wcompat -Wmissing-signatures -rtsopts -threaded -with-rtsopts=-N -with-rtsopts=-T -fprof-auto
build-depends: build-depends:
base ^>= 4.14.3.0 cassava ^>= 0.5.2.0
, cassava ^>= 0.5.2.0
, containers ^>= 0.6.5.1 , containers ^>= 0.6.5.1
, extra ^>= 1.7.9 , extra ^>= 1.7.9
, full-text-search ^>= 0.2.1.4 , full-text-search ^>= 0.2.1.4
...@@ -881,41 +778,27 @@ executable gargantext-server ...@@ -881,41 +778,27 @@ executable gargantext-server
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
, unordered-containers ^>= 0.2.16.0 , unordered-containers ^>= 0.2.16.0
, vector ^>= 0.7.3 , vector ^>= 0.7.3
default-language: Haskell2010
executable gargantext-upgrade executable gargantext-upgrade
import:
defaults
, optimized
main-is: Main.hs main-is: Main.hs
other-modules: other-modules:
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
bin/gargantext-upgrade bin/gargantext-upgrade
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends: build-depends:
base ^>= 4.14.3.0 cron ^>= 0.7.0
, cron ^>= 0.7.0
, extra ^>= 1.7.9 , extra ^>= 1.7.9
, gargantext , gargantext
, gargantext-prelude , gargantext-prelude
, postgresql-simple ^>= 0.6.4 , postgresql-simple ^>= 0.6.4
, text ^>= 1.2.4.1 , text ^>= 1.2.4.1
default-language: Haskell2010
test-suite garg-test-tasty test-suite garg-test-tasty
import:
defaults
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: drivers/tasty/Main.hs main-is: drivers/tasty/Main.hs
other-modules: other-modules:
...@@ -952,28 +835,12 @@ test-suite garg-test-tasty ...@@ -952,28 +835,12 @@ test-suite garg-test-tasty
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
test test
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
QuickCheck ^>= 2.14.2 QuickCheck ^>= 2.14.2
, aeson ^>= 1.5.6.0 , aeson ^>= 1.5.6.0
, aeson-qq , aeson-qq
, async ^>= 2.2.4 , async ^>= 2.2.4
, base ^>= 4.14.3.0
, boolexpr ^>= 0.2 , boolexpr ^>= 0.2
, bytestring ^>= 0.10.12.0 , bytestring ^>= 0.10.12.0
, case-insensitive , case-insensitive
...@@ -1031,9 +898,10 @@ test-suite garg-test-tasty ...@@ -1031,9 +898,10 @@ test-suite garg-test-tasty
, wai , wai
, wai-extra , wai-extra
, warp , warp
default-language: Haskell2010
test-suite garg-test-hspec test-suite garg-test-hspec
import:
defaults
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: drivers/hspec/Main.hs main-is: drivers/hspec/Main.hs
other-modules: other-modules:
...@@ -1053,38 +921,12 @@ test-suite garg-test-hspec ...@@ -1053,38 +921,12 @@ test-suite garg-test-hspec
Paths_gargantext Paths_gargantext
hs-source-dirs: hs-source-dirs:
test test
default-extensions:
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
StrictData
DataKinds
DeriveGeneric
FlexibleContexts
FlexibleInstances
GeneralizedNewtypeDeriving
ImportQualifiedPost
MultiParamTypeClasses
NoImplicitPrelude
OverloadedStrings
RankNTypes
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends: build-depends:
QuickCheck ^>= 2.14.2 QuickCheck ^>= 2.14.2
, aeson ^>= 1.5.6.0 , aeson ^>= 1.5.6.0
, aeson-qq , aeson-qq
, async ^>= 2.2.4 , async ^>= 2.2.4
, base ^>= 4.14.3.0
, boolexpr ^>= 0.2 , boolexpr ^>= 0.2
, bytestring ^>= 0.10.12.0 , bytestring ^>= 0.10.12.0
, case-insensitive , case-insensitive
...@@ -1141,7 +983,6 @@ test-suite garg-test-hspec ...@@ -1141,7 +983,6 @@ test-suite garg-test-hspec
, wai , wai
, wai-extra , wai-extra
, warp , warp
default-language: Haskell2010
benchmark garg-bench benchmark garg-bench
main-is: Main.hs main-is: Main.hs
...@@ -1158,3 +999,5 @@ benchmark garg-bench ...@@ -1158,3 +999,5 @@ benchmark garg-bench
ghc-options: "-with-rtsopts=-T -A32m" ghc-options: "-with-rtsopts=-T -A32m"
if impl(ghc >= 8.6) if impl(ghc >= 8.6)
ghc-options: "-with-rtsopts=--nonmoving-gc" ghc-options: "-with-rtsopts=--nonmoving-gc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment