GHC's `-package <pkg>` can expose installed package not listed by `ghc-pkg list <pkg>`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- haskell
- 領域
- build-system, tooling
調査の方向性
まず、報告されている Fedora と GHC 9.6.6 の環境で stack --resolver lts-22.43 build aeson を再現し、次に完全な --verbose 出力と attoparsec および attoparsec-internal の --dependency エントリを調べます。ghc-pkg が報告したパッケージ識別子と、GHC に渡されたものを比較します。完了とみなす条件は、os-string の回避策なしでビルドが成功するか、またはこの問題が GHC の外部動作に依存していることが確認されることです。
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Haskell
- スター
- 4.1k
- フォーク
- 857
- 平均マージ
- 17時間 32分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commercialhaskell/stack のほかの issue
-
Build Stack against Cabal >= 3.18対応中かも @mpilgrem が 14 日前に担当しました。 オープン
commercialhaskell/stack#6976 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compiling再び着手できるかも @mpilgrem が 135 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomponent: build type: enhancement
commercialhaskell/stack#6951 · リアクション 3 件 · 担当者 1 名 ·
-
Support semaphore-compat 2.0.0再び着手できるかも @mpilgrem が 158 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · コメント 3 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
commercialhaskell/stack#6864 · コメント 1 件 ·
commercialhaskell/stack の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
alunduil/network-arbitrary#293 ·
メンテナーはふだん 1 日以内に返信
-
area:client bug priority-low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
simplex-chat/simplex-chat#8372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9710 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信