diff --git a/cabal-install/Distribution/Client/SetupWrapper.hs b/cabal-install/Distribution/Client/SetupWrapper.hs index c4ff805a97f..6069f87063a 100644 --- a/cabal-install/Distribution/Client/SetupWrapper.hs +++ b/cabal-install/Distribution/Client/SetupWrapper.hs @@ -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 @@ -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 diff --git a/cabal-install/changelog b/cabal-install/changelog index 616ad386280..f4652094a96 100644 --- a/cabal-install/changelog +++ b/cabal-install/changelog @@ -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 March 2016 * If there are multiple remote repos, 'cabal update' now updates