-
Notifications
You must be signed in to change notification settings - Fork 697
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
cabal haddock fails with internal libraries #4969
Comments
fwiw, I managed to generate haddocks back then in July for http://hackage.haskell.org/package/haddock-library EDIT: I just tried again (with cabal HEAD), it still works just fine!
results in https://gist.github.com/3d1c22e67a75c3e7117f64b8a03d7a3b |
Hmm, so broken only with old-build? Interesting. |
Is the plan to not fix this and wait for new-haddock? |
Yeah, I'm pretty OK with just saying "use new-build" for this one. |
Now what? This bug is quite nasty and it effectively prevents all kinds of distributors like Nix and openSUSE from generating Haddock documentation for any package that uses an internal library. 😞 |
haskell/cabal#4969 means that Haddock cannot generate documentation for packages that use internal libraries.
@peti There's not going to be a TLDR, you need to invoke |
It would be super nice if |
Well, I'm not saying we wouldn't welcome a patch for that. But please understand the priority for some of us here is getting the overdue |
@hvr So if I'm understanding correctly, in the example above we could do |
@hvr,
I tried to do that, but I couldn't figure out what exactly you mean. The
Now, there are flags that I could pass, but none of them seem to do what you suggested we should do. If you have the chance, could you please post a slightly more verbose explanation or maybe even a complete example of how to build the documentation for, say |
This is necessary to avoid haskell/cabal#4969.
This is necessary to avoid haskell/cabal#4969.
Any work-around for |
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
The documentation for `addCorePlugin` says it has to be in a separate package to the plugin. However it appears that in GHC's eyes internal libraries in a Cabal package are separate packages, so we can hide all of this in a single package, which is much nicer. We can then organize things a bit more neatly inside. We then have to do some shennanigans to get doctest to work. The normal tests work fine, since Cabal registers the built internal library as a package, and that's fine. But doctest interprets things, which *doesn't* work. Now, I initially tried to just pass the appropriate `-package-db` arguments to `doctest`, but in doing so I hit what appears to be a [Cabal bug with internal libraries](haskell/cabal#5857). However, somehow `cabal repl` and friends seem to get around this, and fortunately there is now a `cabal doctest` command, which amazingly also seems to pass the right set of obscure flags. So we use that. Finally, in an extremely irritating discovery, apparently [Haddock doesn't work with internal libraries] (haskell/cabal#4969) (possibly fixed in a newer Cabal, who knows), so I ended up having to exclude `plutus-tx` from Haddock generation for now.
When using internal libraries, cabal haddock seems to fail unconditionally:
The text was updated successfully, but these errors were encountered: