diff options
| -rw-r--r-- | lib/Distribution/Helper.hs | 8 | ||||
| -rw-r--r-- | tests/GhcSession.hs | 5 | 
2 files changed, 10 insertions, 3 deletions
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 diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index ca91dd4..a4ccac8 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -152,8 +152,9 @@ compileModule nb ep opts = do             ChExeEntrypoint m'  ms    ->               let -               -- The options first clear out includes, then put in the build dir. We want the -               -- first one after that, so "regex-example" in the following case +               -- The options first clear out includes, then put in the build +               -- dir. We want the first one after that, so "regex-example" in +               -- the following case                 --                 -- ,"-i"                 -- ,"-idist/build/regex-example"  | 
