From 94c7695f4d25ecae8df655326351bf6014e02a9e Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 21 Dec 2019 04:33:24 +0100 Subject: Restore lost [Note Stack Cabal Version] --- lib/Distribution/Helper.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/Distribution/Helper.hs') diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index 7448b2b..507adad 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -614,6 +614,20 @@ readProjInfo qe pc pcm pi = withVerbosity $ do , piImpl = ProjInfoStack } +-- [Note Stack Cabal Version] +-- +-- Stack just uses ghc-pkg on the global-pkg-db to determine the +-- appropriate Cabal version for a resolver when building, see +-- Stack.Setup.pathsFromCompiler(cabalPkgVer). We do essentially the same +-- thing here. +-- +-- The code for building Setup.hs is in Stack.Build.Execute and the version +-- of cabal is set in withSingleContext.withCabal.getPackageArgs. +-- +-- Note there is some special casing going on (see 'depsMinusCabal'), they +-- use the packages from the snapshot pkg-db except Cabal which comes from +-- the global pkg-db. + readUnitInfo :: Helper pt -> Unit pt -> UnitModTimes -> IO UnitInfo readUnitInfo helper unit@Unit {uUnitId=uiUnitId} uiModTimes = do res <- runHelper helper unit -- cgit v1.2.3