From 385685dc9da4d95e39e17a323a69d12f1204c951 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 26 Oct 2018 04:19:48 +0200 Subject: Add some comments --- lib/Distribution/Helper.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/Distribution/Helper.hs') diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index fe9ef44..8a4676b 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -341,7 +341,7 @@ reconfigureUnit :: QueryEnvI c pt -> Unit -> IO () reconfigureUnit QueryEnv{qeDistDir=DistDirV1{}, ..} Unit{uPackageDir=_} = do return () reconfigureUnit QueryEnv{qeDistDir=DistDirV2{}, ..} Unit{uPackageDir=_} = do - return () + return () -- TODO: new-build --only-configure reconfigureUnit QueryEnv{qeDistDir=DistDirStack{}, ..} Unit{uPackageDir} = do _ <- liftIO $ qeReadProcess (Just uPackageDir) (stackProgram qePrograms) ["stack", "build", "--only-configure", "."] "" @@ -458,6 +458,12 @@ planUnits plan = do return $ Just $ Left u takeunit _ = return $ Nothing +-- [Note Stack Cabal Version] +-- +-- Stack just uses a ghc-pkg invocation on the global-pkg-db to determine the +-- appropriate Cabal version for a resolver when building, see +-- Stack.GhcPkg.getCabalPkgVer. We do essentially the same thing here, but we +-- use --simple-output instead of using @ghc-pkg field@. readUnitInfo :: QueryEnvI c pt -> FilePath -> Unit -> IO UnitInfo readUnitInfo -- cgit v1.2.3