File tree Expand file tree Collapse file tree
Cabal/src/Distribution/Backpack
cabal-testsuite/PackageTests/Backpack Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,7 +258,17 @@ toLinkedComponent
258258 hang
259259 (text " Non-library component has unfilled requirements:" )
260260 4
261- (vcat [pretty req | req <- Set. toList reqs])
261+ ( vcat
262+ [ case Map. lookup req (modScopeRequires linked_shape0) of
263+ Just srcs@ (_ : _) ->
264+ hang
265+ (pretty req)
266+ 4
267+ (vcat [text " brought into scope by" <+> dispModuleSource (getSource src) | src <- srcs])
268+ _ -> pretty req
269+ | req <- Set. toList reqs
270+ ]
271+ )
262272
263273 -- NB: do NOT include hidden modules here: GHC 7.10's ghc-pkg
264274 -- won't allow it (since someone could directly synthesize
Original file line number Diff line number Diff line change 11# Setup configure
22Configuring Fail1-0.1.0.0...
33Error:
4- Non-library component has unfilled requirements: UnfilledSig
4+ Non-library component has unfilled requirements:
5+ UnfilledSig brought into scope by build-depends: Fail1
56 In the stanza executable foo
Original file line number Diff line number Diff line change 11# Setup configure
22Configuring Fail1-0.1.0.0...
33Error:
4- Non-library component has unfilled requirements: UnfilledSig
4+ Non-library component has unfilled requirements:
5+ UnfilledSig brought into scope by build-depends: Fail1
56 In the stanza executable foo
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ main = setupAndCabalTest $ do
33 skipUnlessGhcVersion " >= 8.1"
44 r <- fails $ setup' " configure" []
55 assertOutputContains " UnfilledSig" r
6+ assertOutputContains " brought into scope by" r
67 return ()
Original file line number Diff line number Diff line change 1+ cabal-version : 3.0
2+ name : Fail4
3+ version : 0.1.0.0
4+ license : BSD-3-Clause
5+ author : Edward Z. Yang
6+ maintainer : ezyang@cs.stanford.edu
7+ build-type : Simple
8+
9+ library sig-lib-a
10+ signatures : UnfilledSig
11+ build-depends : base
12+ hs-source-dirs : lib-a
13+ default-language : Haskell2010
14+
15+ library sig-lib-b
16+ signatures : UnfilledSig
17+ build-depends : base
18+ hs-source-dirs : lib-b
19+ default-language : Haskell2010
20+
21+ executable foo
22+ build-depends : Fail4 :sig-lib-a, Fail4 :sig-lib-b
23+ main-is : Main.hs
24+ default-language : Haskell2010
Original file line number Diff line number Diff line change 1+ main = return ()
Original file line number Diff line number Diff line change 1+ signature UnfilledSig where
Original file line number Diff line number Diff line change 1+ signature UnfilledSig where
Original file line number Diff line number Diff line change 1+ # Setup configure
2+ Configuring Fail4-0.1.0.0...
3+ Error:
4+ Non-library component has unfilled requirements:
5+ UnfilledSig
6+ brought into scope by build-depends: Fail4:sig-lib-a
7+ brought into scope by build-depends: Fail4:sig-lib-b
8+ In the stanza executable foo
Original file line number Diff line number Diff line change 1+ # Setup configure
2+ Configuring Fail4-0.1.0.0...
3+ Error:
4+ Non-library component has unfilled requirements:
5+ UnfilledSig
6+ brought into scope by build-depends: Fail4:sig-lib-a
7+ brought into scope by build-depends: Fail4:sig-lib-b
8+ In the stanza executable foo
You can’t perform that action at this time.
0 commit comments