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

Sanity check does not include GHC_PACKAGE_PATH #5556

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Bug fixes:
[#5545](https://github.com/commercialhaskell/stack/issues/5545)
* Bump `pantry` version for better OS support. See
[pantry#33](https://github.com/commercialhaskell/pantry/issues/33)
* When building the sanity check for a new GHC install, make sure to clear
`GHC_PACKAGE_PATH`.


## v2.7.1
Expand Down
11 changes: 9 additions & 2 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,16 @@ ensureSandboxedCompiler sopts getSetupInfo' = do
case res of
Left _ -> loop xs
Right y -> parseAbsFile y
compiler <- withProcessContext menv $ loop names
compiler <- withProcessContext menv $ do
compiler <- loop names

-- Run this here to ensure that the sanity check uses the modified
-- environment, otherwise we may infect GHC_PACKAGE_PATH and break sanity
-- checks.
when (soptsSanityCheck sopts) $ sanityCheck compiler

pure compiler

when (soptsSanityCheck sopts) $ sanityCheck compiler
cp <- pathsFromCompiler wc compilerBuild True compiler
pure (cp, paths)

Expand Down