diff options
Diffstat (limited to 'lib')
-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 |