[Haskell-cafe] Re: what does the hidden package error mean?

Claus Reinke claus.reinke at talk21.com
Sat Apr 11 13:59:31 EDT 2009


>> what a confusing error message, can we change it to say
>> "package Foo is missing from the MyPackage.cabal build-depends"
>> would be a lot more obvious how to fix it.
>> 
> The problem is that ghc doesn't know that, and shouldn't[1]: All it sees
> is a -hide-all-packages on its command line, you can witness it by
> calling cabal with the -v flag.

Yes, but the user is calling cabal, not ghc - isn't it cabal's task to 
interpret any error messages from tools it uses internally and to 
present them (cabal knows that it has passed -hide-all-packages,
and is therefore able to interpret ghc's error message; the user 
doesn't/shouldn't need to know about these internal details)?

I once suggested an error-handling wrapper for this purpose

http://www.haskell.org/pipermail/cabal-devel/2007-December/001498.html

but in the absence of
 
> OTOH, having some cross-compiler, machine-readable format to describe
> errors would enable cabal to do some holding of hands, as well as
> save ide developers from having to write all these boring parsers.

Duncan seemed rather unhappy about the idea of doing a simple
regexp-based error-message-pattern-to-cabal-level explanation;-)

Mostly, he wanted to focus cabal hacking resources on less ad-hoc
tasks, but I still think fleshing this out would make a helpful cabal feature..

Claus

ps. there was a hacked-up sketch of such a script at the end of the
    thread, but it seems to have used the wrong encoding for the
    mailinglist archives. I think it was the wrapper code attached to 
    this message (which matches for the kind of error message to 
    check if there is a known suggestion for it - the rule set could
    have been extended whenever issues became faqs).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cabal-wrapper.hs
Type: application/octet-stream
Size: 2462 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090411/65ccf10a/cabal-wrapper.obj


More information about the Haskell-Cafe mailing list