Commit 14b50f3c authored by Edward Z. Yang's avatar Edward Z. Yang Committed by Edward Z. Yang
Browse files

Report an error if a non-library has unfilled requirements.

Signed-off-by: default avatarEdward Z. Yang <>
parent 542789ea
......@@ -192,6 +192,14 @@ toLinkedComponent verbosity db this_pid pkg_map ConfiguredComponent {
(modScopeProvides linked_shape0)
let isNotLib (CLib _) = False
isNotLib _ = True
when (not (Set.null reqs) && isNotLib component) $
failProgress $
text "The" <+> text (showComponentName (componentName component)) <+>
text "has unfilled requirements:" <+>
hsep (punctuate comma [disp req | req <- Set.toList reqs])
-- OK, compute the reexports
-- TODO: This code reports the errors for reexports one reexport at
-- a time. Better to collect them all up and report them all at
name: Fail1
license: BSD3
author: Edward Z. Yang
build-type: Simple
cabal-version: >=1.25
signatures: UnfilledSig
build-depends: base
executable foo
build-depends: Fail1
main-is: Main.hs
default-language: Haskell2010
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
r <- fails $ setup' "configure" []
assertOutputContains "UnfilledSig" r
return ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment