-
Notifications
You must be signed in to change notification settings - Fork 237
Is it really necessary to require Cabal >= 2 for haddock-library? #804
Comments
Fwiw, the latest |
There isn't really a fundamental reason, beyond using shiny new features in the
In short: handling the (IMO already gross) vendored |
@harpocrates That's not the point. Obviously, this was possible in a hacky way; this is exactly how we had to do this before cabal 2.0; but which I cleaned up once we had cabal 2.0 which provided us a clean/proper way to vendor libs. ;-( And I'm honestly quite annoyed that you use words like "gross" to describe something I considered rather elegant ;-(( |
@hvr certainly the internal-lib version of the vendoring is much more elegant than the not internal lib version. However, I think that not vendoring is certainly the most elegant solution of all :-) In any case, to answer @jgm's question in the way that might unblock the quickest -- can't you just tweak the @hvr I think the issue btw on why they are using stack is they are trying to build something fully-statically-linked and the best instructions around for doing so involve exactly that config (https://www.fpcomplete.com/blog/2016/10/static-compilation-with-stack). If there was a better way to do that with more modern tools, then that would be preferable -- but I confess I'm not wise enough to know of one :-) |
That's fine for haddock itself. But pandoc uses haddock-library to convert to and from haddock format, and pandoc can be built with much older ghc versions. It would be nice if this one piece of the ecosystem didn't force using more modern tools to build the project.
I can look into this possibility. I can't remember whether I tried that.
I've tried every incantation I could think of to build a fully statically-linked pandoc using cabal, and so far I've failed. By fully static, I mean
No dynamic linking, even to basic system libraries. Passing cabal the same ghc-options and cabal flags that do the trick for stack does not work, for reasons I don't understand. Using stack also gives a guarantee that the same underlying libraries will be used for every package build, on every platform, which is helpful. (I know this can probably be done now with cabal freeze, though.) |
The What appears to work for me, is to run When I tried to install EDIT: I had totally forgotten that I myself had proposed the implementation of the |
@sjakobi thanks a lot, that worked! This issue can be closed, as far as I'm concerned. |
When we do a static linux build of pandoc for our linux binary packages, we use an alpine docker image that only has ghc 8.0.2, so we need to use the lts-9 resolver for stack. This means we have Cabal < 2, so we can't include an up-to-date version of haddock-library. As a result, the pandoc binary we produce will not handle some of the newer haddock features, like tables.
If there is any way to avoid requiring Cabal > 2 for haddock-library, it would be a good thing.
The text was updated successfully, but these errors were encountered: