`stack haddock` groups modules incorrectly
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- haskell
- Área
- build-system, cli, documentation
Línea de trabajo
Reproduce el problema con los archivos stack.yaml y package.yaml proporcionados y, a continuación, inspecciona la invocación detallada de stack haddock y el all/index.html generado. Compara las entradas de package-db y la agrupación de módulos; se considera terminado cuando las dependencias aparecen bajo sus grupos de paquetes correctos, incluidos base, transformers y mtl.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Overview
When running stack haddock in a project, the generated documentation groups documentation modules in an unpredictable way.
Steps to reproduce
Create a trivial project with a few dependencies, like so:
# stack.yaml
snapshot:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/34.yaml
packages:
- .
# package.yaml
dependencies:
- base
- storable-record
library:
source-dirs: lib
Then run stack haddock. Then open the documentation at file:///<project>/.stack-work/install/<platform>/<hash>/<ghc>/doc/all/index.html.
In it, modules are not grouped in a way that makes sense. For instance:
- all
basemodules are grouped underQuickCheck-2.15.0.1; - all
transformersmodules are grouped undersemigroups-0.20.1; - all
mtlmodules are at the top level, not within a package group.
A call to $ stack haddock --verbose reveals that documentation is created with the following haddock call:
/$HOME/.ghcup/ghc/9.10.3/bin/haddock-ghc-9.10.3 \
--optghc=-package-db=/$HOME/.stack/snapshots/x86_64-linux/8a23ab0f4c447aa1863c20e527e4f2aeeec2f0c3c2ab9fbe859c65d4c711ecc7/9.10.3/pkgdb \
--optghc=-package-db=/$HOME/$PROJECT/.stack-work/install/x86_64-linux/8a23ab0f4c447aa1863c20e527e4f2aeeec2f0c3c2ab9fbe859c65d4c711ecc7/9.10.3/pkgdb \
--gen-contents \
--gen-index \
-i ../ghc-boot-th-9.10.3-9679,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/ghc-boot-th-9.10.3-9679/ghc-boot-th.haddock \
-i ../mtl-2.3.1-bcd6,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/mtl-2.3.1-bcd6/mtl.haddock \
-i ../array-0.5.8.0-4471,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/array-0.5.8.0-4471/array.haddock \
-i ../ghc-internal-9.1003.0-a65c,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/ghc-internal-9.1003.0-a65c/ghc-internal.haddock \
-i ../storable-record-0.0.7,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/storable-record-0.0.7/storable-record.haddock \
-i ../utility-ht-0.0.17.2,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/utility-ht-0.0.17.2/utility-ht.haddock \
-i ../containers-0.7-bf99,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/containers-0.7-bf99/containers.haddock \
-i ../splitmix-0.1.3.2,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/splitmix-0.1.3.2/splitmix.haddock \
-i ../pretty-1.1.3.6-7ead,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/pretty-1.1.3.6-7ead/pretty.haddock \
-i ../haddock-issue-0.0.0,/$HOME/$PROJECT/.stack-work/install/x86_64-linux/8a23ab0f4c447aa1863c20e527e4f2aeeec2f0c3c2ab9fbe859c65d4c711ecc7/9.10.3/doc/haddock-issue-0.0.0/haddock-issue.haddock \
-i ../deepseq-1.5.0.0-268d,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/deepseq-1.5.0.0-268d/deepseq.haddock \
-i ../template-haskell-2.22.0.0-5e01,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/template-haskell-2.22.0.0-5e01/template-haskell.haddock \
-i ../random-1.2.1.3,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/random-1.2.1.3/random.haddock \
-i ../ghc-bignum-1.3-9ca9,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/ghc-bignum-1.3-9ca9/ghc-bignum.haddock \
-i ../QuickCheck-2.15.0.1,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/QuickCheck-2.15.0.1/QuickCheck.haddock \
-i ../base-4.20.2.0-127e,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/base-4.20.2.0-127e/base.haddock \
-i ../bytestring-0.12.2.0-825f,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/bytestring-0.12.2.0-825f/bytestring.haddock \
-i ../semigroups-0.20.1,/$HOME/.stack/snapshots/x86_64-linux/03a149f03ae9045878c23602050e9feb226fcf703f9493ca6662ad2a61705976/9.10.3/doc/semigroups-0.20.1/semigroups.haddock \
-i ../transformers-0.6.1.1-4229,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/transformers-0.6.1.1-4229/transformers.haddock \
-i ../ghc-prim-0.12.0-d0f9,/$HOME/.ghcup/ghc/9.10.3/lib/ghc-9.10.3/lib/../../../share/doc/ghc-9.10.3/html/libraries/ghc-prim-0.12.0-d0f9/ghc-prim.haddock
I have tried running the same command without the package-db arguments, and it removes all grouping, which suggests that the issue stems from an incorrect grouping in the pkgdb files?
Stack version
$ stack --version
Version 3.9.3, Git revision c7eb8487a82d5c3e0b88d56f8b8a98be23223eb5 x86_64 hpack-0.39.1
- Lenguaje dominante
- Haskell
- Estrellas
- 4.1k
- Forks
- 857
- Merge medio
- 17 h 32 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de commercialhaskell/stack
-
Build Stack against Cabal >= 3.18Posiblemente ocupada @mpilgrem la tomó hace 14 días. Abierto
commercialhaskell/stack#6976 · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compilingQuizá libre de nuevo @mpilgrem la tomó hace 135 días y no hay ningún pull request abierto. Abiertocomponent: build type: enhancement
commercialhaskell/stack#6951 · 3 reacciones · 1 asignado ·
-
Support semaphore-compat 2.0.0Quizá libre de nuevo @mpilgrem la tomó hace 158 días y no hay ningún pull request abierto. Abiertocomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · 3 comentarios · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
commercialhaskell/stack#6863 · 3 comentarios ·
Todos los issues de commercialhaskell/stack
Issues similares
-
area:client bug priority-low
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 91/100
simplex-chat/simplex-chat#8372 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9710 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
agda/agda#8965 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
http-semantics-0.5.0Abiertofailure: bounds
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
commercialhaskell/stackage#8187 · 1 reacción ·
Los mantenedores suelen responder en 1 día