From 852dbc69d276e19add3917d17dff5541d84e29d4 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 11 Jan 2020 07:46:33 +0100 Subject: 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 --- tests/custom-setup/Setup.hs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/custom-setup/Setup.hs (limited to 'tests/custom-setup/Setup.hs') diff --git a/tests/custom-setup/Setup.hs b/tests/custom-setup/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/tests/custom-setup/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain -- cgit v1.2.3