aboutsummaryrefslogtreecommitdiff
path: root/tests/CompileTest.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2020-01-11 07:46:33 +0100
committerDaniel Gröber <dxld@darkboxed.org>2020-05-02 15:44:26 +0200
commit852dbc69d276e19add3917d17dff5541d84e29d4 (patch)
treeb01a16ee9a03fb491dfdf50a7bc717b76e95d445 /tests/CompileTest.hs
parentf0741c61bd82ec0f94edcfa8d950f349eac86c33 (diff)
Fix Cabal version selection for build-type:Custom
Previously we would pick up Stack's Cabal version with ghc-pkg on the global package-db. This however ignores that Stack also supports custom Setup.hs with the Cabal version from the snapshot instead. In cabal v2-build we have a similar problem. We used to assume that plan.json's cabal-lib-version is used uniformly across units but this is similarly untrue. To fix both of these we re-stage the cabal version query to after reconfiguring a unit, then we can just lookup the Cabal version in setup-config. Fixes #95
Diffstat (limited to 'tests/CompileTest.hs')
-rw-r--r--tests/CompileTest.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/CompileTest.hs b/tests/CompileTest.hs
index 02580f8..e77e3de 100644
--- a/tests/CompileTest.hs
+++ b/tests/CompileTest.hs
@@ -155,11 +155,11 @@ testCabalVersions versions = do
mcabalVersions <- runMaybeT $ listCabalVersions (Just db)
case mcabalVersions of
Just [hdver] ->
- return $ che0 (CabalVersion hdver) (Just db)
+ return $ che0 (CabalVersion hdver) [db]
_ ->
- return $ che0 (CabalHEAD ()) Nothing
+ return $ che0 (CabalHEAD ()) []
(CabalVersion ver) ->
- return $ che0 (CabalVersion ver) Nothing
+ return $ che0 (CabalVersion ver) []
compileHelper che