GHC's `-package <pkg>` can expose installed package not listed by `ghc-pkg list <pkg>`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- haskell
- Área
- build-system, tooling
Línea de trabajo
Comienza reproduciendo stack --resolver lts-22.43 build aeson en la configuración de Fedora y GHC 9.6.6 indicada, y después inspecciona toda la salida de --verbose y las entradas de --dependency para attoparsec y attoparsec-internal. Compara los identificadores de paquete comunicados por ghc-pkg con los que se pasan a GHC; se considera terminado cuando la compilación tiene éxito sin la solución alternativa de os-string o se confirma que el problema depende del comportamiento externo de GHC.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
EDIT (by @mpilgrem): The anomaly described below is likely due to the bug (from Stack's perspective) in GHC versions described at:
In short:
- if an installed package has a
namethat is in the format that Cabal (the library) uses to 'mung' sub-libraries, some versions of GHC treat thatnameas if it were the name of the Cabal package for the purpose's of GHC's-packageoption; and - as a consequence, GHC's
-package <pkg>option can, in practice, cause an installed package to be exposed that is not one listed byghc-pkg list <pkg>.
Stack, on the other hand, relies on an installed package having a unique name specified by its name field and that GHC's -package <pkg> option will expose only a installed package listed by ghc-pkg list <pkg>.
So far noone else has seen this: so likely it is an anomaly only in my system.
General summary/comments
After updating my projects to latest lts-22 (lts >= 22.42), builds using attoparsec started to fail for me.
Steps to reproduce
(Not reproducible so far except on my laptop)
stack --resolver lts-22.43 build aeson
Expected
To build normally.
Actual
EDIT (by @mpilgrem): Some output has been reformatted for clarity
$ stack --resolver lts-22.43 build aeson
:
aeson > configure
aeson > Configuring aeson-2.1.2.1...
aeson > Error: Cabal-simple_LRiJ_wrZ_3.10.3.0_ghc-9.6.6: Encountered missing or
aeson > private dependencies:
aeson > attoparsec ==0.14.4
aeson >
Completed 13 action(s).
Error: [S-7282]
Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011]
While building package aeson-2.1.2.1 (scroll up to its section to see the error) using:
/var/home/petersen/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_LRiJ_wrZ_3.10.3.0_ghc-9.6.6
--verbose=1
--builddir=.stack-work/dist/x86_64-linux-tinfo6/ghc-9.6.6
configure
--with-ghc=/var/home/petersen/.stack/programs/x86_64-linux/ghc-tinfo6-9.6.6/bin/ghc
--with-ghc-pkg=/usr/bin/ghc-pkg-9.6.6
--user
--package-db=clear
--package-db=global
--package-db=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/pkgdb
--libdir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/lib
--bindir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/bin
--datadir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/share
--libexecdir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/libexec
--sysconfdir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/etc
--docdir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/doc/aeson-2.1.2.1
--htmldir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/doc/aeson-2.1.2.1
--haddockdir=/var/home/petersen/.stack/snapshots/x86_64-linux-tinfo6/18cf10429d6b1427d08f2a7a920a4c784cc1f0eaa6921458e36e04319528d1da/9.6.6/doc/aeson-2.1.2.1
--dependency=OneTuple=OneTuple-0.4.2-7od06fXUUXRBNk1V3VY0g5
--dependency=QuickCheck=QuickCheck-2.14.3-E9VttT8lnId93rGQPNsiU9
--dependency=attoparsec=attoparsec-0.14.4-GAKm7J8Gleq2k06HFjeIeY-attoparsec-internal
--dependency=base=base-4.18.2.1
--dependency=base-compat-batteries=base-compat-batteries-0.13.1-5fbdeENWe9mF7TcjAFq4dk
--dependency=bytestring=bytestring-0.11.5.3
--dependency=containers=containers-0.6.7
--dependency=data-fix=data-fix-0.3.4-2n4PElhIt1Q7w0n82lPfpl
--dependency=deepseq=deepseq-1.4.8.1
--dependency=dlist=dlist-1.0-7vDlnn0Hdvg35SyXLwMaWr
--dependency=exceptions=exceptions-0.10.7
--dependency=generically=generically-0.1.1-I9byc5Nil798plofO827gA
--dependency=ghc-prim=ghc-prim-0.10.0
--dependency=hashable=hashable-1.4.4.0-GGHvrv8RGdcAwi4fOW9L5d
--dependency=indexed-traversable=indexed-traversable-0.1.4-8j5HZpShpE5BqFup9Ojenr
--dependency=primitive=primitive-0.8.0.0-G7z1XrhwN0bFkYsIqIr1QU
--dependency=scientific=scientific-0.3.7.0-BAvZdJlkHDUEf0LOVEPz37
--dependency=semialign=semialign-1.3.1-7lhN9UdvYxAGbqZZCyRcNC
--dependency=strict=strict-0.5-GMywuJToqFcduYfo019sj
--dependency=tagged=tagged-0.8.8-Kzng2lnKElzJiyKd9g735c
--dependency=template-haskell=template-haskell-2.20.0.0
--dependency=text=text-2.0.2
--dependency=text-short=text-short-0.1.6-2ZxoUm7jRrSBd8GMEi1Fas
--dependency=th-abstraction=th-abstraction-0.5.0.0-HAFjiAO2nGN58SdxVZCnLH
--dependency=these=these-1.2.1-KST5KzzcktxI0GEHGKxqQO
--dependency=time=time-1.12.2
--dependency=time-compat=time-compat-1.9.6.1-DIvC8GbQSzcCziVynZc4vt
--dependency=unordered-containers=unordered-containers-0.2.20-5m928IsagguARIfUwwmGLp
--dependency=uuid-types=uuid-types-1.0.5.1-3QSWhjKdWiE4JA9TKvvlMc
--dependency=vector=vector-0.13.1.0-Jdel1KiNlSEIXGg2MpN3IL
--dependency=witherable=witherable-0.4.2-D4tJt8ldIw17tHtCEGjK6w
--dependency=attoparsec:attoparsec-internal=attoparsec-0.14.4-GAKm7J8Gleq2k06HFjeIeY-attoparsec-internal
-f-cffi
-fordered-keymap
--exact-configuration
--ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
See https://gist.github.com/juhp/8cf70c3e00509347ff5e5f4bbfad74c5 for the full --verbose output
Highlighting a few points:
- attoparsec-0.14.4appears twice (probably once for attoparsec and once for attoparsec-internal?)- for attoparsec there is only
--dependency=attoparsec=attoparsec-0.14.4-GAKm7J8Gleq2k06HFjeIeY-attoparsec-internal(attoparsec:attoparsec-internal gets mapped to the same pkgid)
Stack version
2.15.7 and 3.1.1
Method of installation
Fedora Linux and local build
Platform
Fedora Linux
Misc
I am using a workaround: adding os-string-2.0.6 to my project stack.yaml files (the version of os-string in lts < 22.42)
- 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 4/5 3-5 días Aptitud para principiantes 42/100
commercialhaskell/stack#6864 · 1 comentario ·
Todos los issues de commercialhaskell/stack
Issues similares
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
alunduil/network-arbitrary#293 ·
Los mantenedores suelen responder en 1 día
-
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