Skip to content

Commit 6793421

Browse files
committed
Special message when UnkownPackage is wired in #3172
1 parent a239ea7 commit 6793421

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Stack/Build/ConstructPlan.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import Control.Monad.State.Strict (execState)
2626
import Control.Monad.Trans.Resource
2727
import Data.Either
2828
import Data.Function
29+
import qualified Data.HashSet as HashSet
2930
import Data.List
3031
import Data.List.Extra (nubOrd)
3132
import Data.Map.Strict (Map)
@@ -974,6 +975,8 @@ pprintExceptions exceptions stackYaml parentMap wanted =
974975
-- Skip these when they are redundant with 'NotInBuildPlan' info.
975976
pprintException (UnknownPackage name)
976977
| name `Set.member` allNotInBuildPlan = Nothing
978+
| name `HashSet.member` wiredInPackages =
979+
Just $ "Can't build a package with same name as a wired-in-package:" <+> displayCurrentPkgName name
977980
| otherwise = Just $ "Unknown package:" <+> displayCurrentPkgName name
978981

979982
pprintFlags flags

0 commit comments

Comments
 (0)