-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C-only cabal libraries fail to build with haddock = True #2200
Comments
I believe I'm experiencing the same issue on lts-22.26 with libyaml which now has a libyaml-clib. In a slightly different case, attoparsec-aeson also fails to build, both with the same Haddock issue, but also with (Apologies if hijacking this issue, I can open a separate one if preferable!) |
@jonathanlking Thank you, for providing more cases of the same issue.
Don't worry, that's not needed. I think these cases somehow should be handled in the same way. I guess what we would need is some way of disabling haddock for individual libraries for the stack_snapshot call. This might get tedious if more libraries start to use c-only libraries, though. So a more general approach would be to somehow generate an empty haddock file if the cabal build failed to produce one. The best option probably would be if we could inspect the cabal build somehow and generate appropriate |
Oh yes, this is indeed another issue. Empty packages are handled with a blacklist here: rules_haskell/haskell/cabal.bzl Lines 129 to 142 in 8b868c5
Which is also kind of ugly. Maybe it also makes sense to support passing this information into |
Describe the bug
There are a few libraries that depend on internal C libraries packaged in another cabal package (depending on the OS / flags passed to cabal).
For instance, when using a recent stack snapshot that includes zlib 0.7.1.0, this version depends on the internal zlib-clib library either if explicitly requested using the
bundled-c-zlib
flag, or when disabling thepkg-config
flag and the platform is Windows.See haskell/zlib#70
To Reproduce
Trying to build
@stackage//:zlib
results in:The reason for this error is that the zlib-clib library is a C only library which does not produce any haddock.
Expected behavior
Environment
Additional context
The only possible workaround is to disable haddock generation altogether:
The text was updated successfully, but these errors were encountered: