Fix cabal-helper >= 0.5
This commit is contained in:
parent
6a01550d3f
commit
9b286cc4e1
@ -125,6 +125,10 @@ withCabal :: (IOish m, GmEnv m, GmLog m) => m a -> m a
|
|||||||
withCabal action = do
|
withCabal action = do
|
||||||
crdl <- cradle
|
crdl <- cradle
|
||||||
opts <- options
|
opts <- options
|
||||||
|
|
||||||
|
let projdir = cradleRootDir crdl
|
||||||
|
distdir = projdir </> "dist"
|
||||||
|
|
||||||
mCabalFile <- liftIO $ timeFile `traverse` cradleCabalFile crdl
|
mCabalFile <- liftIO $ timeFile `traverse` cradleCabalFile crdl
|
||||||
mCabalConfig <- liftIO $ timeMaybe (setupConfigFile crdl)
|
mCabalConfig <- liftIO $ timeMaybe (setupConfigFile crdl)
|
||||||
|
|
||||||
@ -133,8 +137,7 @@ withCabal action = do
|
|||||||
pkgDbStackOutOfSync <-
|
pkgDbStackOutOfSync <-
|
||||||
case mCusPkgDbStack of
|
case mCusPkgDbStack of
|
||||||
Just cusPkgDbStack -> do
|
Just cusPkgDbStack -> do
|
||||||
let root = cradleRootDir crdl
|
pkgDb <- runQuery' (helperProgs opts) projdir distdir $
|
||||||
pkgDb <- runQuery' (helperProgs opts) root (root </> "dist") $
|
|
||||||
map chPkgToGhcPkg <$> packageDbStack
|
map chPkgToGhcPkg <$> packageDbStack
|
||||||
return $ pkgDb /= cusPkgDbStack
|
return $ pkgDb /= cusPkgDbStack
|
||||||
|
|
||||||
@ -161,7 +164,7 @@ withCabal action = do
|
|||||||
++ map pkgDbArg cusPkgStack
|
++ map pkgDbArg cusPkgStack
|
||||||
liftIO $ void $ readProcess (T.cabalProgram opts) ("configure":progOpts) ""
|
liftIO $ void $ readProcess (T.cabalProgram opts) ("configure":progOpts) ""
|
||||||
gmLog GmDebug "" $ strDoc $ "writing Cabal autogen files"
|
gmLog GmDebug "" $ strDoc $ "writing Cabal autogen files"
|
||||||
liftIO $ writeAutogenFiles $ cradleRootDir crdl </> "dist"
|
liftIO $ writeAutogenFiles readProcess projdir distdir
|
||||||
action
|
action
|
||||||
|
|
||||||
pkgDbArg :: GhcPkgDb -> String
|
pkgDbArg :: GhcPkgDb -> String
|
||||||
|
@ -132,7 +132,7 @@ Library
|
|||||||
, bytestring
|
, bytestring
|
||||||
, cereal >= 0.4
|
, cereal >= 0.4
|
||||||
, containers
|
, containers
|
||||||
, cabal-helper == 0.4.* && >= 0.4.0.0
|
, cabal-helper == 0.5.* && >= 0.5.0.0
|
||||||
, deepseq
|
, deepseq
|
||||||
, directory
|
, directory
|
||||||
, filepath
|
, filepath
|
||||||
|
Loading…
Reference in New Issue
Block a user