diff options
| -rw-r--r-- | src/CabalHelper/Compiletime/Compile.hs | 2 | ||||
| -rw-r--r-- | tests/CompileTest.hs | 8 | ||||
| -rw-r--r-- | tests/GhcSession.hs | 4 | 
3 files changed, 13 insertions, 1 deletions
diff --git a/src/CabalHelper/Compiletime/Compile.hs b/src/CabalHelper/Compiletime/Compile.hs index 88ff51d..f379081 100644 --- a/src/CabalHelper/Compiletime/Compile.hs +++ b/src/CabalHelper/Compiletime/Compile.hs @@ -191,6 +191,8 @@ compileHelper' CompHelperEnv {..} = do     -- we're operating on Cabal itself!     compileWithCabalV2Inplace :: Env => GhcVersion -> Version -> MaybeT IO (IO (), Compile)     compileWithCabalV2Inplace ghcVer cabalVer = do +       -- TODO: Test coverage! Neither compile-test nor ghc-session test out +       -- this code path         PlanJson {pjUnits} <- maybe mzero pure chePlanJson         distdir_newstyle   <- maybe mzero pure cheDistV2         let cabal_pkgid = diff --git a/tests/CompileTest.hs b/tests/CompileTest.hs index 4ad5804..ea5202e 100644 --- a/tests/CompileTest.hs +++ b/tests/CompileTest.hs @@ -2,7 +2,13 @@  {-| This test tries to compile the Helper against every supported version of the    Cabal library. Since we compile the Helper at runtime, on the user's machine, -  it is very important to make sure this will not fail. +  it is very important to make sure this will not fail to compile. + +  This test only covers using v2-build to install the requested Cabal library +  version because it has the best build product caching (keeps CI times +  down). We could also use stack since it has a global package cache but we +  don't support that because stack always comes with the right Cabal library +  version available for a given resolver anyways.  -}  import System.Environment (getArgs) diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index bee7fed..80e9d17 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -91,6 +91,10 @@ main = do            cabal_file = makeRelative topdir cabal_file0 in        TC (TF topdir projdir cabal_file) (parseVer "0") (parseVer "0") [read pt]      [] -> +      -- below V2 is sorted before Stack and V1 since we rely on v2-build's +      -- fucking awesome store cache to keep CI times down. +      -- +      -- TODO: Better test coverage for helper compilation with the other two!        [ TC (TN "exelib")    (parseVer "1.10") (parseVer "0")   []        , TC (TN "exeintlib") (parseVer "2.0")  (parseVer "0")   []        , TC (TN "fliblib")   (parseVer "2.0")  (parseVer "0")   []  | 
