Skip to content

fix(cabal-install): Include all libraries in the --haddock-for-hackage docs tarball - #12366

Open
zlonast wants to merge 4 commits into
haskell:masterfrom
zlonast:zlonast/haddock-tarball-all-libs
Open

zlonast wants to merge 4 commits into
haskell:masterfrom
zlonast:zlonast/haddock-tarball-all-libs

Conversation

@zlonast

@zlonast zlonast commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Fix: #12364

Fix a bug where cabal haddock --haddock-for-hackage created a <pkgid>-docs.tar.gz containing the haddocks of only one library of the package (e.g. only an internal library, or only the main library).


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@ulysses4ever ulysses4ever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks promising, thank you. Any chance you could actually try to upload a package candidate from a tar created this way?

-- own haddocks are done.
hasDocs <- doesDirectoryExist unitHaddockDir
when hasDocs $
copyDirectoryRecursive verbosity unitHaddockDir (tmpDir </> haddockDocsDirName)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can’t you tar before copying back from tmp? And just copy the tar. Copying directories is slower.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't upload (no Hackage credentials), but I check hackage-server locally.

hackage-server requires tar ^>= 0.7
cabal requires tar >= 0.5.0.3 && < 0.8

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Perhaps we should raise the lower limit?

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.

cabal haddock --haddock-for-hackage only includes internal library in tarball

2 participants