tweag/inline-java

Upload docs to hackage?

Closed this issue · 8 comments

Due to build time dependencies on java there are no haddocks on hackage. Maybe consider uploading them manually.

This is a good suggestion. I'll start doing this.

mboes commented

Not as easy as it first looks: it requires getting everything to build with cabal-install, not just Stack (which doesn't know how to upload documentation bundles to Hackage).

There is a nice tool called neil it has doc building and uploading common. If project can be built with cabal then you can generate and upload docs using this tool.

You don't need the tool these days. If it compiles with Cabal you can use cabal itself to upload the docs. First do cabal new-haddock --haddock-for-hackage and then use cabal upload --documentation --publish path-to-previously-generated-doc-tarball.

I guess the problem is that it does not compile with Cabal.

mboes commented

It could, but we'd need project-level configuration that replicates what the stack.yaml says, to find the JVM system lib etc. Meanwhile, the docs work fine on Stackage. Hackage is not a great platform for hosting docs, and they've refused to make it better in the past. Like we did for inline-r, and like many Snoyberg packages do, we should simply point to Stackage.

cabal new-haddock --haddock-for-hackage

This works as is today. :) I'm preparing to upload new releases on hackage.

Done.