From 6b847c923ec62d18e99a30858efc3506cee32dca Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 30 Jul 2019 16:37:01 +0200 Subject: ghc-session: Add GHC version match check --- tests/GhcSession.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index 22b94b4..6816e02 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -9,6 +9,7 @@ module Main where import GHC +import Config import GHC.Paths (libdir) import Outputable import DynFlags @@ -111,10 +112,14 @@ main = do putStrLn $ "cabal-install version: " ++ showVersion ci_ver putStrLn $ "cabal-install builtin Cabal version: " ++ showEsrVer (f_c_ver V1) - putStrLn $ "GHC version: " ++ showVersion g_ver + putStrLn $ "GHC executable version: " ++ showVersion g_ver + putStrLn $ "GHC library version: " ++ cProjectVersion putStrLn $ "Stack version: " ++ showVersion s_ver putStrLn $ "Stack Cabal version: " ++ showEsrVer (f_c_ver Stack) + when (cProjectVersion /= showVersion g_ver) $ + error "GHC version mismatch! See above." + let proj_impls :: [(ProjType, ProjSetup0)] proj_impls = [ (V2, newBuildProjSetup) -- cgit v1.2.3