tvl-depot/users/grfn/xanthous/package.yaml
sterni 2f750e4a14 refactor(grfn/xanthous): avoid unnecessary recompilation
hpack is a bit dumb when generating the list of modules for a cabal
file's component if multiple of them live in the same directory.
Specifically it seems to assume that all modules in the source-dirs
of a particular component are also necessary for its compilation.

This is quite bad in the case of xanthous since both library and
executable have source-dirs: src, so all modules will be compiled
twice: Once for the library and then again for the executable
despite it depending on the library (actually 4 times in total
since we need to build a unprofiled and profiled object for each
module…).

To fix this we just move Main.hs into its own directory and change
the executable's source-dirs, so hpack doesn't get confused anymore.
Since all components now have their own source-dirs, unnecessary
redundant compilation should be down to 0. The diff of the cabal
file shows quite nicely how many module recompilation we've gotten
rid of.

Change-Id: I2df4fab9b0299b3a2b5d3005508c79b2d9796039
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3533
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
2021-09-11 16:00:12 +00:00

155 lines
2.3 KiB
YAML

name: xanthous
version: 0.1.0.0
github: "glittershark/xanthous"
license: GPL-3
author: "Griffin Smith"
maintainer: "root@gws.fyi"
copyright: "2019 Griffin Smith"
extra-source-files:
- README.org
synopsis: A WIP TUI RPG
category: Game
description: Please see the README on GitHub at <https://github.com/glittershark/xanthous>
dependencies:
- base
- aeson
- array
- async
- QuickCheck
- quickcheck-text
- quickcheck-instances
- brick
- bifunctors
- checkers
- classy-prelude
- comonad
- comonad-extras
- constraints
- containers
- criterion
- data-default
- data-interval
- deepseq
- directory
- fgl
- fgl-arbitrary
- file-embed
- filepath
- generic-arbitrary
- generic-lens
- groups
- hgeometry
- hgeometry-combinatorial
- JuicyPixels
- lens
- lifted-async
- linear
- megaparsec
- mmorph
- monad-control
- MonadRandom
- mtl
- optparse-applicative
- parallel
- parser-combinators
- pointed
- random
- random-fu
- random-extras
- random-source
- raw-strings-qq
- reflection
- Rasterific
- splitmix
- streams
- stache
- semigroups
- semigroupoids
- tomland
- transformers
- text
- text-zipper
- vector
- vty
- witherable
- yaml
- zlib
default-extensions:
- BlockArguments
- ConstraintKinds
- DataKinds
- DeriveAnyClass
- DeriveGeneric
- DerivingStrategies
- DerivingVia
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTSyntax
- GeneralizedNewtypeDeriving
- KindSignatures
- StandaloneKindSignatures
- LambdaCase
- MultiWayIf
- NoImplicitPrelude
- NoStarIsType
- OverloadedStrings
- PolyKinds
- RankNTypes
- ScopedTypeVariables
- TupleSections
- TypeApplications
- TypeFamilies
- TypeOperators
- ViewPatterns
ghc-options:
- -Wall
library:
source-dirs: src
executable:
source-dirs: app
main: Main.hs
dependencies:
- xanthous
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O2
tests:
test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -O0
dependencies:
- xanthous
- tasty
- tasty-hunit
- tasty-quickcheck
- lens-properties
benchmarks:
benchmark:
main: Bench.hs
source-dirs: bench
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- xanthous
- criterion