Skip to content

Emit warning when an unknown GHC version is encountered (2.0 backport) #5194

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

Merged
merged 2 commits into from
Mar 9, 2018
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
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 2.0 supports ghc >= 6.11 && < 8.3
unless (ghcVersion < mkVersion [8,3]) $
warn verbosity $
"Unknown/unsupported 'ghc' version detected "
++ "(Cabal " ++ display cabalVersion ++ " supports 'ghc' version < 8.3): "
++ 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.project.travis
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ allow-newer: hackage-repo-tool:Cabal, hackage-repo-tool:time, hackage-repo-tool:
-- build properly (unfortunately the flags here get applied
-- to the dependencies too!)
package Cabal
tests: True
ghc-options: -Werror -fno-warn-orphans

package cabal-install
Expand Down