Skip to content

Warn when external Setup uses old Cabal #3801

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

Closed
wants to merge 1 commit into from
Closed
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: 6 additions & 1 deletion cabal-install/Distribution/Client/SetupWrapper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import Distribution.Simple.Setup
import Distribution.Simple.Utils
( die, debug, info, cabalVersion, tryFindPackageDesc, comparing
, createDirectoryIfMissingVerbose, installExecutableFile
, copyFileVerbose, rewriteFile, intercalate )
, copyFileVerbose, rewriteFile, intercalate, warn )
import Distribution.Client.Utils
( inDir, tryCanonicalizePath, withExtraPathEnv
, existsAndIsMoreRecentThan, moreRecentFile, withEnv
Expand Down Expand Up @@ -480,6 +480,11 @@ getExternalSetupMethod verbosity options pkg bt = do
createDirectoryIfMissingVerbose verbosity True setupDir
(cabalLibVersion, mCabalLibInstalledPkgId, options') <- cabalLibVersionToUse
debug verbosity $ "Using Cabal library version " ++ display cabalLibVersion
when (cabalLibVersion < cabalVersion) $
warn verbosity $
"The external Setup method uses Cabal-" ++ display cabalLibVersion ++
", but cabal-install uses Cabal-" ++ display cabalVersion ++
". If this fails, update the Setup script."
path <- if useCachedSetupExecutable
then getCachedSetupExecutable options'
cabalLibVersion mCabalLibInstalledPkgId
Expand Down
2 changes: 2 additions & 0 deletions cabal-install/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* The '-v/--verbosity' option no longer affects GHC verbosity
(except in the case of '-v0'). Use '--ghc-options=-v' to enable
verbose GHC output (#3540, #3671).
* Added a warning when the external setup method uses a Cabal library
older than that used to build cabal-install (#707).

1.24.0.0 Ryan Thomas <[email protected]> March 2016
* If there are multiple remote repos, 'cabal update' now updates
Expand Down