-
Notifications
You must be signed in to change notification settings - Fork 843
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
Uploading documentation to Hackage, hyperlinking source #737
Comments
Source will be hyperlinked if the The documentation generated by |
In terms of CLI for this, it probably should be possible to upload haddocks independently of, or together with, uploading a package. Making this part of |
👍 |
Few resources:
I'll might have time to look into this issue |
I tried this one way and another, and cleanest approach feels to be to do something like: cabal configure --builddir .../dist-hackage ...
cabal configure --builddir .../dist-hackage haddock ...
tar --format=ustar .../dist-hackage/doc ... # actually programmatically so can have right directory structure without moving files around and have this functionality as Is this approach ok to @borsboom ? |
So far I've been using https://github.com/phadej/binary-orphans/blob/master/hackage-docs.sh script |
The docs generated by |
@borsboom it would be nice if "--with-haddock" was actually the default. |
@denibertovic, no, Hackage must work, and |
@cblp I don't understand. If we upload the docs with the package then hackage doesn't need to generate if for us. Or did I misunderstand how this works? |
@denibertovic, I mean it is normal if Hackage builds docs, and it is not if user has to build and upload docs. |
Well that's not much of a reason... :/ I mean we can change that.... I don't see a reason why not. |
It would be nice if Hackage reliably built documentation. Unfortunately it doesn't. I frequently see documentation either fail to build or take several days to build. It's been like this for years, so it seems like waiting for Hackage to work properly isn't a realistic option. |
I agree with this. And I'm sure we could get the hackage folks on board here and figure out a solution that works for everybody. |
I’ve taken a look at the steps that seem necessary and it doesn’t look too hard:
@borsboom Since you are assigned to this: Do you have any plans to tackle this soon? IMHO this is one of the most important issues since the docs situation on hackage is catastrophic atm. Otherwise I would give it a shot, but I’m short on time and don’t know the stack codebase very well so it could take some time. |
Indeed, just wanted to add that neil is kept updated and we should just borrow/adapt what it is doing :) |
This would a very useful feature to have. Currently, the user has to install cabal, an external ghc with usual settings, and use either the script or the neil tool. +1 |
A stack-enabled fork of https://github.com/ekmett/lens/blob/master/scripts/hackage-docs.sh See also commercialhaskell/stack#737
I would like this feature. |
Any news on this issue? I still have pretty common problems with haddocks and would love a |
What's the status of this issue? What needs to be done? |
BTW I've adapted a script to allow me to just run You can grab it here if you like: https://github.com/ChrisPenner/dotfiles/blob/master/bin/haddock-up |
@IvanMalison I suspect @phadej is no longer working on this, so I'll change the label. |
While cabal has a "--haddocks-for-hackage" flag, stack does not. This is an open issue since 2015. See: commercialhaskell/stack#737 It would probably be easy to implement this in releaser, but that is out of scope for this commit. This commit adds also a very rudimentary detectBuildSystem utility. It might become useful in general.
How on earth do stack users upload packages to hackage today if the stack process can't correctly generate the docs? Do people just use cabal? It seems like I have to be missing something obvious. |
I have published many packages using both Cabal and Stack. I don't think I've ever manually uploaded documentation. |
For some reason when I use stack to do the dist/upload the docs do not show. Not sure what I'm doing wrong. |
I tend to manually upload the documentation afterwards since mine has some dependencies not in the system -- and even then, because of this issue, the hyperlinks that are created with "--haddock-hyperlink-source" are wrong and do not work when uploaded. Hopefully this issue is resolved sometime soon, as the route to solution by cocreature looks solid (admittedly now 6 years ago). |
Closing, as I think this is addressed by #6270 ( |
Hackage from time to time fails to build docs for one reason or another. Would it be possible to add a command to upload docs with hyperlinked source (I think it's a basic courtesy for documentation readers, but
stack haddock
doesn't do that by default, and I can't find any option to make it do this), and upload it to Hackage using the login information used for uploading packages?The text was updated successfully, but these errors were encountered: