Skip to content

Commit

Permalink
Emit warning when an unknown GHC version is encountered
Browse files Browse the repository at this point in the history
Forward-ported from 5339b36

Addresses #415
  • Loading branch information
hvr committed Feb 23, 2018
1 parent 6f50672 commit c01d92f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cabal/Distribution/Simple/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ configure verbosity hcPath hcPkgPath conf0 = do
(userMaybeSpecifyPath "ghc" hcPath conf0)
let implInfo = ghcVersionImplInfo ghcVersion

-- Cabal currently supports ghc >= 6.11 && < 8.7
unless (ghcVersion < mkVersion [8,7]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal " ++ display cabalVersion ++ " supports 'ghc' version < 8.7): "
++ programPath ghcProg ++ " is version " ++ display ghcVersion

-- This is slightly tricky, we have to configure ghc first, then we use the
-- location of ghc to help find ghc-pkg in the case that the user did not
-- specify the location of ghc-pkg directly:
Expand Down
1 change: 1 addition & 0 deletions Cabal/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
`D.S.findHookedPackageDesc` (#4874).
* `D.S.getHookedBuildInfo` now takes an additional parameter
specifying the build directory path (#4874).
* Emit warning when encountering unknown GHC versions (#415).
* TODO

2.0.1.1 Mikhail Glushenkov <[email protected]> December 2017
Expand Down

0 comments on commit c01d92f

Please sign in to comment.