# Problem with creating docs with cabal-install-3.14.1.0

**URL:** <https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464>\
**Category:** Learn\
**Created:** [February 21, 2025, 2:11am UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464 "2025-02-21T02:11:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaitskov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/yaitskov/32/671_2.png) [@yaitskov](https://discourse.haskell.org/u/yaitskov)\
**Post date:** [February 21, 2025, 2:11am UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/1 "2025-02-21T02:11:19Z")

</div>

Thanks,

I had a problem with [hackage docs](https://hackage.haskell.org/upload) 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’

---

<div class="post-metadata">

**Author:** ![Lysxia](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lysxia/32/2916_2.png) [@Lysxia](https://discourse.haskell.org/u/Lysxia)\
**Post date:** [February 22, 2025, 10:45am UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/2 "2025-02-22T10:45:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yaitskov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/yaitskov/32/671_2.png) [@yaitskov](https://discourse.haskell.org/u/yaitskov)\
**Post date:** [February 23, 2025, 9:44pm UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/3 "2025-02-23T21:44:52Z")

</div>

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:

```bash
#!/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.

---

<div class="post-metadata">

**Author:** ![alanz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/alanz/32/678_2.png) [@alanz](https://discourse.haskell.org/u/alanz)\
**Post date:** [February 23, 2025, 9:46pm UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/4 "2025-02-23T21:46:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sclv](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/sclv/32/71_2.png) [@sclv](https://discourse.haskell.org/u/sclv)\
**Post date:** [February 24, 2025, 4:47pm UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/5 "2025-02-24T16:47:54Z")

</div>

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](https://github.com/haskell/hackage-server/pull/1348)

---

<div class="post-metadata">

**Author:** ![artem](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/artem/32/56_2.png) [@artem](https://discourse.haskell.org/u/artem)\
**Post date:** [February 26, 2025, 10:06pm UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/6 "2025-02-26T22:06:15Z")

</div>

I think @alanz might have this issue in mind [`cabal upload` throwing curl errors · Issue #10252 · haskell/cabal · GitHub](https://github.com/haskell/cabal/issues/10252)

---

<div class="post-metadata">

**Author:** ![alanz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/alanz/32/678_2.png) [@alanz](https://discourse.haskell.org/u/alanz)\
**Post date:** [February 26, 2025, 10:15pm UTC](https://discourse.haskell.org/t/problem-with-creating-docs-with-cabal-install-3-14-1-0/11464/7 "2025-02-26T22:15:53Z")

</div>

> [@artem](#):
>
> I think @alanz might have this issue in mind

Yep, that’s the one.
