From 2dd7143061891b98bc81c12013e9ea19d7452bed Mon Sep 17 00:00:00 2001 From: Kirill Zaborsky Date: Thu, 27 Dec 2018 15:07:01 +0300 Subject: [PATCH] use proper $PATH (with GHC available) doing source map hashing --- src/Stack/Setup.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index a8469a48dc..320692ecca 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -265,15 +265,16 @@ setupEnv needTargets boptsCLI mResolveMissingGHC = do -- Set up a modified environment which includes the modified PATH -- that GHC can be found on. This is needed for looking up global - -- package information. + -- package information and ghc fingerprint (result from 'ghc --info'). let bcPath :: BuildConfig - bcPath = set processContextL menv bc - smActual <- runRIO bcPath $ - toActual (bcSMWanted bc) (bcDownloadCompiler bc) compilerVer + bcPath = set envOverrideSettingsL (\_ -> return menv) $ + set processContextL menv bc + sourceMap <- runRIO bcPath $ do + smActual <- toActual (bcSMWanted bc) (bcDownloadCompiler bc) compilerVer + let haddockDeps = shouldHaddockDeps (configBuild config) + targets <- parseTargets needTargets haddockDeps boptsCLI smActual + loadSourceMap targets boptsCLI smActual - let haddockDeps = shouldHaddockDeps (configBuild config) - targets <- parseTargets needTargets haddockDeps boptsCLI smActual - sourceMap <- loadSourceMap targets boptsCLI smActual let envConfig0 = EnvConfig { envConfigBuildConfig = bc , envConfigCabalVersion = cabalVer