Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use proper $PATH (with GHC available) doing source map hashing #4467

Merged
merged 1 commit into from
Dec 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down