Make sure cabal-helper is ready before invoking dumpsym
This commit is contained in:
parent
312a8c81fb
commit
cbfa26eb16
@ -20,6 +20,7 @@ module Language.Haskell.GhcMod.CabalHelper
|
|||||||
( getComponents
|
( getComponents
|
||||||
, getGhcMergedPkgOptions
|
, getGhcMergedPkgOptions
|
||||||
, getPackageDbStack
|
, getPackageDbStack
|
||||||
|
, prepareCabalHelper
|
||||||
)
|
)
|
||||||
#endif
|
#endif
|
||||||
where
|
where
|
||||||
@ -126,6 +127,14 @@ getComponents = chCached Cached {
|
|||||||
, a == a'
|
, a == a'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
prepareCabalHelper :: (IOish m, GmEnv m, GmLog m) => m ()
|
||||||
|
prepareCabalHelper = do
|
||||||
|
crdl <- cradle
|
||||||
|
let projdir = cradleRootDir crdl
|
||||||
|
distdir = projdir </> "dist"
|
||||||
|
readProc <- gmReadProcess
|
||||||
|
liftIO $ prepare readProc projdir distdir
|
||||||
|
|
||||||
withCabal :: (IOish m, GmEnv m, GmLog m) => m a -> m a
|
withCabal :: (IOish m, GmEnv m, GmLog m) => m a -> m a
|
||||||
withCabal action = do
|
withCabal action = do
|
||||||
crdl <- cradle
|
crdl <- cradle
|
||||||
|
@ -52,6 +52,7 @@ module Language.Haskell.GhcMod.Internal (
|
|||||||
, GmComponent(..)
|
, GmComponent(..)
|
||||||
, GmComponentType(..)
|
, GmComponentType(..)
|
||||||
, GmModuleGraph(..)
|
, GmModuleGraph(..)
|
||||||
|
, prepareCabalHelper
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import GHC.Paths (libdir)
|
import GHC.Paths (libdir)
|
||||||
@ -65,6 +66,7 @@ import Language.Haskell.GhcMod.Monad
|
|||||||
import Language.Haskell.GhcMod.Types
|
import Language.Haskell.GhcMod.Types
|
||||||
import Language.Haskell.GhcMod.Utils
|
import Language.Haskell.GhcMod.Utils
|
||||||
import Language.Haskell.GhcMod.World
|
import Language.Haskell.GhcMod.World
|
||||||
|
import Language.Haskell.GhcMod.CabalHelper
|
||||||
|
|
||||||
-- | Obtaining the directory for ghc system libraries.
|
-- | Obtaining the directory for ghc system libraries.
|
||||||
ghcLibDir :: FilePath
|
ghcLibDir :: FilePath
|
||||||
|
@ -371,6 +371,7 @@ globalCommands _ = Nothing
|
|||||||
legacyInteractive :: IOish m => GhcModT m ()
|
legacyInteractive :: IOish m => GhcModT m ()
|
||||||
legacyInteractive = do
|
legacyInteractive = do
|
||||||
opt <- options
|
opt <- options
|
||||||
|
prepareCabalHelper
|
||||||
symdbreq <- liftIO $ newSymDbReq opt
|
symdbreq <- liftIO $ newSymDbReq opt
|
||||||
world <- getCurrentWorld
|
world <- getCurrentWorld
|
||||||
legacyInteractiveLoop symdbreq world
|
legacyInteractiveLoop symdbreq world
|
||||||
|
Loading…
Reference in New Issue
Block a user