GHC's `-package <pkg>` can expose installed package not listed by `ghc-pkg list <pkg>`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- haskell
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện stack --resolver lts-22.43 build aeson trên thiết lập Fedora và GHC 9.6.6 được báo cáo, sau đó kiểm tra toàn bộ đầu ra --verbose và các mục --dependency cho attoparsec và attoparsec-internal. So sánh các mã định danh gói do ghc-pkg báo cáo với các mã được truyền cho GHC; được xem là hoàn tất khi quá trình build thành công mà không cần workaround os-string, hoặc đã xác nhận rằng vấn đề phụ thuộc vào hành vi bên ngoài của GHC.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Haskell
- Star
- 4.1k
- Fork
- 857
- Merge trung bình
- 17 giờ 32 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của commercialhaskell/stack
-
Build Stack against Cabal >= 3.18Có thể đã có người làm @mpilgrem đã nhận 14 ngày trước. Đang mở
commercialhaskell/stack#6976 · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compilingCó thể làm lại được @mpilgrem đã nhận 135 ngày trước và không có pull request nào đang mở. Đang mởcomponent: build type: enhancement
commercialhaskell/stack#6951 · 3 reaction · 1 người được giao ·
-
Support semaphore-compat 2.0.0Có thể làm lại được @mpilgrem đã nhận 158 ngày trước và không có pull request nào đang mở. Đang mởcomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · 3 bình luận · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
commercialhaskell/stack#6864 · 1 bình luận ·
Tất cả issue của commercialhaskell/stack
Issue tương tự
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
alunduil/network-arbitrary#293 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:client bug priority-low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 91/100
simplex-chat/simplex-chat#8372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
compiler-explorer/compiler-explorer#9710 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agda/agda#8965 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày