Skip to content

Commit fd8198b

Browse files
authored
Merge branch 'master' into fix6139
2 parents 17c9408 + 31a54bb commit fd8198b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Bug fixes:
2525
* With `stack hoogle`, avoid the message
2626
`Minimum version is hoogle-5.0. Found acceptable hoogle-<x.y.z> in your index, requiring its installation.`
2727
when a `hoogle` executable has already been found on the `PATH`.
28+
* Stack's sanity check on a selected GHC now passes GHC flag
29+
`-hide-all-packages`, stopping GHC from looking for a package environment in
30+
default locations.
2831

2932
## v2.11.1 - 2023-05-18
3033

src/Stack/Setup.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,6 +2348,12 @@ sanityCheck ghc = withSystemTempDir "stack-sanity-check" $ \dir -> do
23482348
eres <- withWorkingDir (toFilePath dir) $ proc (toFilePath ghc)
23492349
[ fp
23502350
, "-no-user-package-db"
2351+
-- Required to stop GHC looking for a package environment in default
2352+
-- locations.
2353+
, "-hide-all-packages"
2354+
-- Required because GHC flag -hide-all-packages is passed.
2355+
, "-package base"
2356+
, "-package Cabal" -- required for "import Distribution.Simple"
23512357
] $ try . readProcess_
23522358
case eres of
23532359
Left e -> prettyThrowIO $ GHCSanityCheckCompileFailed e ghc

0 commit comments

Comments
 (0)