BuildClient: docs uploads for multi-library packages are rejected by checkDocTarball; switch to `cabal haddock --haddock-for-hackage`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- haskell
- Ambito
- build-system, documentation
Direzione di ricerca
Start in exes/BuildClient.hs at buildPackage, then compare the v2-test project flow and checkDocTarball validation. Run the documentation-builder tests with a multi-library package such as happy-lib or hackage-cli, using a toolchain containing GHC MR !16706. Done means the generated tarball passes validation while preserving reports, logs, pruning, and dry-run behavior; note the re-export-only limitation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hackage's documentation builder (exes/BuildClient.hs) cannot publish documentation for any package with sub-libraries. The v1-based docs build does generate the haddocks of all the libraries of a package, but the hand-packed tarball contains the Hoogle description files haddock writes for sub-libraries, named <pkg>:<sublib>.txt (GHC MR !16706). Since the stricter upload validation was deployed, checkDocTarball rejects these tarballs:
Invalid windows file name in tar archive:
"happy-lib-2.0-docs\\backend-glr\\happy-lib:backend-glr.txt"
So for packages like haskell-debugger (dap-server), happy-lib (five internal libraries) or hackage-cli (cabal-revisions), Hackage ends up with no documentation at all. See haskell/cabal#10973 (first report of the rejected upload) and haskell/cabal#12364.
It might be worth solving the problem this way https://github.com/haskell/hackage-server/pull/1522
buildPackage now runs the current v2 flow in the unpacked package's project (the same project v2-test already uses):
cabal haddock all --haddock-for-hackage --build-summary=<results>/<pkgid>.report
and uploads the tarball cabal produces, instead of hand-packing the htmldir tree. --haddock-for-hackage bakes in the same hosting URLs the client used to pass explicitly (/package/$pkg-$version(/docs)), and implies html, hoogle, hyperlinked source and quickjump. Build reports (install-outcome gating for the test step), logs, --prune-haddock-files (unpack → prune → repack) and --dry-run are preserved.
Requirements: the builder's toolchain must ship the haddock fix from GHC MR !16706 (with an older haddock, checkDocTarball rejects the builder's own uploads for multi-library packages — that is the status quo).
Known limitation
Libraries whose only modules are re-exports are currently not haddocked by the v2 flow (cabal's hasValidHaddockTargets gate; see haskell/cabal#10368), so for such packages the tarball has no root index.html. All sub-library haddocks are present and the tarball passes validation — strictly better than the status quo, but the cabal-side gate should ideally be relaxed too.
- Lingua principale
- Haskell
- Stelle
- 471
- Fork
- 228
- Merge medio
- 5g 6h
- PR unite (30g)
- 3
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di haskell/hackage-server
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 22/100
haskell/hackage-server#1530 · 4 commenti · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
haskell/hackage-server#1528 · 1 commento ·
-
Count downloads from content delivery networkForse già presa @LaurentRDC l’ha presa 60 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
haskell/hackage-server#1517 · 1 commento ·
-
hackage-mirror can't mirror old packagesForse già presa @TTyChud l’ha presa 7 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 40/100
haskell/hackage-server#1515 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
haskell/hackage-server#1503 ·
Tutte le issue di haskell/hackage-server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
haskell/bytestring#730 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
seal-harness/seal-harness#399 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
reflex-frp/reflex#563 ·