Cabal: allBuildInfo does not include foreign library dependencies

Created on 13 Sep 2017  Â·  5Comments  Â·  Source: haskell/cabal

This may be a misunderstanding on my part, I'm not familiar with foreign libraries outside of the type ForeignLib itself. But it appears that:

  • A ForeignLib can introduce dependencies on packages
  • The allBuildInfo function will not return the BuildInfo values within ForeignLibs

It seems like this means we will not necessarily track dependencies from ForeignLibs. Is this intentional?

user-question

Most helpful comment

Cool, I'll PR it then, since it's actually within my skill set :)

On Wed, Sep 13, 2017 at 4:28 PM, Edward Z. Yang notifications@github.com
wrote:

This is a straight up bug in allBuildInfo and we should fix it.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/haskell/cabal/issues/4763#issuecomment-329167668, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADBB8815ioSET5o9lr2tdXz3nFvq9o3ks5sh9h3gaJpZM4PV6lK
.

All 5 comments

/cc @ezyang @edsko

I've introduced a modified version of allBuildInfo in Stack to work around this:

https://github.com/commercialhaskell/stack/commit/8f61b8cb5782dd25ea5cca77eef73485f4681925

If you look in that commit, you'll see a modification to an integration test (adding a foreign library dependency on the mtl package). Without the allBuildInfo' change, this causes an error when building. Note that I also tested cabal-install-2.0.0.0 with both the install and new-build commands. Both of them installed mtl. So it appears to me at least that cabal-install has a different dependency tracking mechanism than allBuildInfo.

This is a straight up bug in allBuildInfo and we should fix it.

Cool, I'll PR it then, since it's actually within my skill set :)

On Wed, Sep 13, 2017 at 4:28 PM, Edward Z. Yang notifications@github.com
wrote:

This is a straight up bug in allBuildInfo and we should fix it.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/haskell/cabal/issues/4763#issuecomment-329167668, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADBB8815ioSET5o9lr2tdXz3nFvq9o3ks5sh9h3gaJpZM4PV6lK
.

Also backported into the 2.0 branch.

Was this page helpful?
0 / 5 - 0 ratings