Skip to content
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

haddock bundle script #465

Merged
merged 2 commits into from
Mar 27, 2023
Merged

haddock bundle script #465

merged 2 commits into from
Mar 27, 2023

Conversation

phadej
Copy link
Contributor

@phadej phadej commented Jul 6, 2022

No description provided.

This is an initial experiment. It works quite well, but it could be
better.

- Links to identifiers in different packages go outside of optics
  (e.g. from optics-extra modules to optics-core to
   https://hackage.haskell.org/package/optics-0.4.2/docs/Optics-Indexed.html)
  but the links which are internal to package stay there.
@phadej phadej marked this pull request as ready for review July 7, 2022 15:24
@phadej phadej requested a review from adamgundry July 7, 2022 15:24
@phadej phadej changed the title WIP: haddock bundle script haddock bundle script Jul 9, 2022
@adamgundry
Copy link
Member

Nice! Thanks for looking into this. I haven't looked extremely closely at the code, but the results on https://hackage.haskell.org/package/optics look good. 😄

Did you manage to resolve the issue with there being a few missing links?

We should remove the note from the description saying "Hackage does not yet display documentation for reexported-modules".

Fixes #237.

@arybczak
Copy link
Collaborator

arybczak commented Jul 14, 2022

While this looks great, it seems that modules from optics-extra are missing links 😞

@arybczak
Copy link
Collaborator

arybczak commented Jul 14, 2022

I wonder if providing dummy files that redirect to modules in appropriate package with <meta http-equiv="refresh" content="0; url=...> would work 🤔

The other problem is that if you generate documentation locally, you lose links to all packages that are not available.

@phadej
Copy link
Contributor Author

phadej commented Jul 19, 2022

Did you manage to resolve the issue with there being a few missing links?

No, that seems to be some issue with haddock, i have no idea what it could be.

@phadej
Copy link
Contributor Author

phadej commented Oct 31, 2022

Can this be merged before it bitrots? AFAIU the issues are unfortunately caused by difference between v2-haddock and how hackage's doc builder builds docs, and fixing that would need either fixing cabal-install (and haddock?) or changing the approach completely.

@@ -0,0 +1,38 @@
#!/bin/sh

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a brief "Usage" section? Even if it's running it without any arguments.

@phadej
Copy link
Contributor Author

phadej commented Jan 27, 2023

I added a commit which seems to fix links from optics-extra packages

@adamgundry
Copy link
Member

Nice work tracking that down! And sorry for letting this linger, let's get it merged. I'm assuming you already uploaded docs to Hackage, since I see them published...

I think we should:

  • Remove the note from the description saying "Hackage does not yet display documentation for reexported-modules".
  • Briefly document the release process somewhere. Is the only new step is running haddockbundle.sh and uploading the generated dist-newstyle/optics-bundled-docs.tar, and can one do that directly with cabal upload -d?

@phadej
Copy link
Contributor Author

phadej commented Jan 27, 2023

can one do that directly with cabal upload -d

I don't know, never used that one.

Briefly document the release process somewhere.

Once someone does it, they could write a trace of what they did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants