-
Notifications
You must be signed in to change notification settings - Fork 239
Allow to hide interfaces when rendering multiple components #1487
Conversation
This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package.
We should bump the version of haddock program, this will allow |
@coot Do you need it in a timeline shorter than GHC 9.4? |
Do we have a chance to get |
Ok, we'll coordinate with Cabal then |
@Mikolaj FYI ☝️ |
Hi! That's a perfect moment, because we are going to release cabal 3.8.1 soon and we can depend on the new haddock and there is just enough time to test it a tiny bit. Would you mind creating a cabal PR? |
I forgot, and was reminded by @Kleidukos that cabal does not depend directly on haddock. Here's some brainstorming:
|
Sadly, it seems we need cabal to be able to work with old haddock in 9.2 and with new one in 9.4. Sounds like CPP. BTW, it would be bad if older cabal, e.g., 3.6.3 was broken with haddock from 9.4. If so, GHC 9.4 would need to advertise it requires cabal 3.8. But there's probably not enough time before 9.4 release to set it all up, given that cabal is not yet even aware of the changes. Could we slow it down or make optional or degrade gracefully in case of new haddock and old cabal? |
I've now git-grepped:
so apparently we can at least determine the version of haddock and act accordingly (and not via CPP). |
@Mikolaj I relay on |
Disable what exactly for what version? |
I speaking about |
@coot: pardon me being dense and let me rephrase and please correct me. Current master branch of cabal is not broken, right? It would be broken if your cabal PR was merged and found its way into a released cabal, but new haddock was not released by that time? And a way to prevent this breakage is to test for haddock version in the PR and disable all the functionality that doesn't work with old haddock? |
Right, it isn't.
It actually wouldn't. Today I added a requirement for the
Yes |
Amazing. If there's anything we can help with on the cabal side, please make sure to let us know. |
Review haskell/cabal#8162 :) |
This is useful when one wishes to
--gen-contents
when renderingmultiple components, but one does not want to render all modules in the module graph. This
is in particular useful when adding base package to interfaces, to prevent from rendering all of its modules making the important modules hard to find. Adding base package through
--read-interface
is useful so links to things likeIO
can be resolved.This PR changes parsing of
--read-interface
in backward compatible way.