Problem with creating docs with cabal-install-3.14.1.0

Thanks,

I had a problem with hackage docs with cabal-install 3.14.1.0.

If builddir argument is supplied without dot (mktemp returns such path on my system)
then the process stucks awaiting input form the user:

rm: remove write-protected regular file ‘dist-docs.TZVTX0/build/x86_64-linux/ghc-9.10.1/trace-if-0.0.2/doc/html/trace-if-0.0.2-docs/quick-jump.css’

What command did you run so someone else can reproduce this?

2 Likes

Thanks for ping.
Today I tried to reproduce the issue and having fresh look figure out what happened.
I haven’t gotten permissions yet to upload so I copied the script except last line:

#!/bin/sh
set -e

dir=$(mktemp -d dist-docs.XXXXXX)
trap 'rm -r "$dir"' EXIT

# assumes cabal 2.4 or later
cabal v2-haddock --builddir="$dir" --haddock-for-hackage --enable-doc

# cabal upload -d --publish $dir/*-docs.tar.gz

trap collects all results on exit via rm and gets stuck when tries to remove some write-protected files generated by cabal, but haddock tar file is removed by that time!

I would use rm with -f to avoid distracting the user with the input.

The last time I tried this (for ghc-exactprint) the upload step failed because of some unsupported curl feature on the server side. I forget the exact details.

hackage didn’t accept the gzip content type for documentation uploads (tarballs needed to be uploaded uncompressed). i believe this has recently been fixed fix expected content-types for documentation tarballs by MangoIV · Pull Request #1348 · haskell/hackage-server · GitHub

2 Likes

I think @alanz might have this issue in mind `cabal upload` throwing curl errors · Issue #10252 · haskell/cabal · GitHub

Yep, that’s the one.