Skip to content

Commit 9034c9d

Browse files
committed
Fix #5758 Warn only if GHC > 9.2 or > Cabal > 3.6
1 parent 8bf6a5a commit 9034c9d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Stack/Setup.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ warnUnsupportedCompiler ghcVersion = do
475475
logWarn "For more information, see: https://github.com/commercialhaskell/stack/issues/648"
476476
logWarn ""
477477
pure True
478-
| ghcVersion >= mkVersion [9, 1] -> do
478+
| ghcVersion >= mkVersion [9, 3] -> do
479479
logWarn $
480-
"Stack has not been tested with GHC versions above 9.0, and using " <>
480+
"Stack has not been tested with GHC versions above 9.2, and using " <>
481481
fromString (versionString ghcVersion) <>
482482
", this may fail"
483483
pure True
@@ -502,9 +502,9 @@ warnUnsupportedCompilerCabal cp didWarn = do
502502
logWarn "This invocation will most likely fail."
503503
logWarn "To fix this, either use an older version of Stack or a newer resolver"
504504
logWarn "Acceptable resolvers: lts-3.0/nightly-2015-05-05 or later"
505-
| cabalVersion >= mkVersion [3, 5] ->
505+
| cabalVersion >= mkVersion [3, 7] ->
506506
logWarn $
507-
"Stack has not been tested with Cabal versions above 3.4, but version " <>
507+
"Stack has not been tested with Cabal versions above 3.6, but version " <>
508508
fromString (versionString cabalVersion) <>
509509
" was found, this may fail"
510510
| otherwise -> pure ()
@@ -610,7 +610,7 @@ ensureCompiler
610610
ensureCompiler sopts getSetupInfo' = do
611611
let wanted = soptsWantedCompiler sopts
612612
wc <- either throwIO (pure . whichCompiler) $ wantedToActual wanted
613-
613+
614614
hook <- ghcInstallHook
615615
hookIsExecutable <- handleIO (\_ -> pure False) $ if osIsWindows
616616
then doesFileExist hook -- can't really detect executable on windows, only file extension
@@ -645,7 +645,7 @@ ensureCompiler sopts getSetupInfo' = do
645645
-- if the hook fails, we fall through to stacks sandboxed installation
646646
hookGHC <- runGHCInstallHook sopts hook
647647
maybe (pure Nothing) checkCompiler hookGHC
648-
| otherwise -> return Nothing
648+
| otherwise -> return Nothing
649649
case mcp of
650650
Nothing -> ensureSandboxedCompiler sopts getSetupInfo'
651651
Just cp -> do

0 commit comments

Comments
 (0)