Skip to content

Commit 560d28a

Browse files
authored
Merge pull request #6215 from commercialhaskell/fix6213
Fix #6213 Better messages when build plan not constructed
2 parents 490d2f0 + c0b7a0f commit 560d28a

File tree

6 files changed

+214
-166
lines changed

6 files changed

+214
-166
lines changed

src/Stack/Build/ConstructPlan.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import Stack.Types.Package
6969
)
7070
import Stack.Types.ParentMap ( ParentMap )
7171
import Stack.Types.Platform ( HasPlatform (..) )
72+
import Stack.Types.ProjectConfig ( isPCGlobalProject )
7273
import Stack.Types.Runner ( HasRunner (..), globalOptsL )
7374
import Stack.Types.SourceMap
7475
( CommonPackage (..), DepPackage (..), FromSnapshot (..)
@@ -299,8 +300,9 @@ constructPlan baseConfigOpts0 localDumpPkgs loadPackage0 sourceMap installedMap
299300
else do
300301
stackYaml <- view stackYamlL
301302
stackRoot <- view stackRootL
303+
isImplicitGlobal <- view $ configL.to (isPCGlobalProject . configProject)
302304
prettyThrowM $ ConstructPlanFailed
303-
errs stackYaml stackRoot parents (wanted ctx) prunedGlobalDeps
305+
errs stackYaml stackRoot isImplicitGlobal parents (wanted ctx) prunedGlobalDeps
304306
where
305307
hasBaseInDeps = Map.member (mkPackageName "base") (smDeps sourceMap)
306308

src/Stack/Prelude.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module Stack.Prelude
7878
, sep
7979
, softbreak
8080
, softline
81+
, spacedBulletedList
8182
, string
8283
, style
8384
, vsep
@@ -109,8 +110,8 @@ import RIO.PrettyPrint
109110
, prettyErrorL, prettyInfo, prettyInfoL, prettyInfoS
110111
, prettyNote, prettyNoteL, prettyNoteS, prettyWarn
111112
, prettyWarnL, prettyWarnNoIndent, prettyWarnS, punctuate
112-
, sep, softbreak, softline, string, style, stylesUpdateL
113-
, useColorL, vsep
113+
, sep, softbreak, softline, spacedBulletedList, string, style
114+
, stylesUpdateL, useColorL, vsep, spacedBulletedList
114115
)
115116
import RIO.PrettyPrint.DefaultStyles (defaultStyles)
116117
import RIO.PrettyPrint.PrettyException ( PrettyException (..) )

0 commit comments

Comments
 (0)