Skip to content

Commit

Permalink
Fix constraint error for cli extra deps #3378
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Aug 29, 2017
1 parent 7102a1c commit 6b90805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ChangeLog.md
Expand Up @@ -113,7 +113,9 @@ Bug fixes:
See [#3366](https://github.com/commercialhaskell/stack/pull/3366).
* `stack script` can now handle relative paths to source files.
See [#3372](https://github.com/commercialhaskell/stack/issues/3372).

* Fixes explanation of why a target is needed by the build plan, when the
target is an extra dependency from the commandline.
See [#3378](https://github.com/commercialhaskell/stack/issues/3378).

## 1.5.1

Expand Down
7 changes: 4 additions & 3 deletions src/Stack/Build/ConstructPlan.hs
Expand Up @@ -185,8 +185,9 @@ constructPlan ls0 baseConfigOpts0 locals extraToBuild0 localDumpPkgs loadPackage
mapM_ onWanted $ filter lpWanted locals
mapM_ (addDep False) $ Set.toList extraToBuild0
lp <- getLocalPackages
let ctx = mkCtx econfig (unliftIO u . getPackageVersions) lp
((), m, W efinals installExes dirtyReason deps warnings parents) <-
liftIO $ runRWST inner (ctx econfig (unliftIO u . getPackageVersions) lp) M.empty
liftIO $ runRWST inner ctx M.empty
mapM_ logWarn (warnings [])
let toEither (_, Left e) = Left e
toEither (k, Right v) = Right (k, v)
Expand Down Expand Up @@ -216,10 +217,10 @@ constructPlan ls0 baseConfigOpts0 locals extraToBuild0 localDumpPkgs loadPackage
else do
planDebug $ show errs
stackYaml <- view stackYamlL
prettyError $ pprintExceptions errs stackYaml parents (wantedLocalPackages locals)
prettyError $ pprintExceptions errs stackYaml parents (wanted ctx)
throwM $ ConstructPlanFailed "Plan construction failed."
where
ctx econfig getVersions0 lp = Ctx
mkCtx econfig getVersions0 lp = Ctx
{ ls = ls0
, baseConfigOpts = baseConfigOpts0
, loadPackage = loadPackage0
Expand Down

0 comments on commit 6b90805

Please sign in to comment.