diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-12-21 04:33:24 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-12-21 04:33:24 +0100 |
commit | 94c7695f4d25ecae8df655326351bf6014e02a9e (patch) | |
tree | d33daa272350d16912e8e5af998154c9a212bd8e /lib/Distribution/Helper.hs | |
parent | c20981c0cf56d0a9d9fbfba9be961dbb4d5896c9 (diff) |
Restore lost [Note Stack Cabal Version]
Diffstat (limited to 'lib/Distribution/Helper.hs')
-rw-r--r-- | lib/Distribution/Helper.hs | 14 |
1 files changed, 14 insertions, 0 deletions
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 |