diff options
| author | Joey Hess <joeyh@joeyh.name> | 2018-04-22 12:15:35 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2018-04-22 12:19:40 -0400 |
| commit | d8d2faece72eabd18c2ff303e5fb63c3a69961f6 (patch) | |
| tree | e4fba26d18e3db8b52a94d80aff21413b642c67d /src | |
| parent | 57ec3e2451ad7dfa70d4a1b522259e0036e3e6f2 (diff) | |
separate Hs-Source-Dirs for binaries
This is a trick I only just learned about, see
https://stackoverflow.com/questions/6711151/how-to-avoid-recompiling-in-this-cabal-file#6711739
Significantly increased propellor build speed when your config.hs is in
a fork of the propellor repository, by avoiding redundant builds of
propellor library.
Also avoids needing to list all the build deps 3 times.
Also avoids cabal 2.x wanting every module to be listed 3 times.
Note that the bulk of wrapper.hs had to move into the propellor library,
since that code depended on stuff not exposed by the library.
This commit was sponsored by Henrik Riomar on Patreon.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Wrapper.hs (renamed from src/wrapper.hs) | 9 | ||||
| l--------- | src/propellor-config.hs | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/wrapper.hs b/src/Propellor/Wrapper.hs index 20b4d8c6..f399b2cf 100644 --- a/src/wrapper.hs +++ b/src/Propellor/Wrapper.hs @@ -1,4 +1,5 @@ --- | Wrapper program for propellor distribution. +-- | This module is used to implement a wrapper program for propellor +-- distribution. -- -- Distributions should install this program into PATH. -- (Cabal builds it as dist/build/propellor/propellor). @@ -10,7 +11,7 @@ -- If ./config.hs exists and looks like a propellor config file, -- it instead builds and runs in the current working directory. -module Main where +module Propellor.Wrapper (runWrapper) where import Propellor.DotDir import Propellor.Message @@ -30,8 +31,8 @@ import Control.Monad.IfElse import Control.Applicative import Prelude -main :: IO () -main = withConcurrentOutput $ do +runWrapper :: IO () +runWrapper = withConcurrentOutput $ do useFileSystemEncoding go =<< getArgs where diff --git a/src/propellor-config.hs b/src/propellor-config.hs deleted file mode 120000 index e3af968e..00000000 --- a/src/propellor-config.hs +++ /dev/null @@ -1 +0,0 @@ -../config.hs
\ No newline at end of file |
