Discourage messing with boot packages

Đang mở
#6,706 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
haskell
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu từ đường dẫn lỗi của build-plan phát ra [S-4804] và thông báo extra-deps được khuyến nghị; truy vết cách xác định các ghi đè boot-package. Hoàn tất khi khuyến nghị cảnh báo về các ảnh hưởng dây chuyền của việc ghi đè một boot-package và đề xuất tránh các ghi đè như vậy khi thích hợp. Issue cũng đề cập đến một cảnh báo có thể có trong stack ls dependencies, nhưng phạm vi của nó chưa được xác định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

General summary/comments (optional)

When failing to produce a build plan due to a constraint on a boot package, warn that overriding the version for the boot package has more cascading implications than for a regular package (cf [S-4804])

Steps to reproduce

Trying to build current Ormolu HEAD (2db4b1f761caf6b9092f5702937bfc075ad56534) against lts-23.17 ^[not a bug for them, I just try to cut down on the number of different LTSs I build against on my machine] I get

Error: [S-4804]
       Stack failed to construct a build plan.
       
       While constructing the build plan, Stack encountered the following errors. The 'Stack
       configuration' refers to the set of package versions specified by the snapshot (after any dropped
       packages, or pruned GHC boot packages; if a boot package is replaced, Stack prunes all other such
       packages that depend on it) and any extra-deps:
       
       In the dependencies for ghc-lib-parser-9.12.1.20250105:
         * filepath must match >=1.5 && <1.6, but filepath-1.4.301.0 is in the Stack configuration (latest
           matching version is 1.5.4.0).
       The above is/are needed due to ormolu-0.8.0.0 -> ghc-lib-parser-9.12.1.20250105
       
       Some different approaches to resolving some or all of this:
       
         * To ignore all version constraints and build anyway, pass --allow-newer, or, in
           /home/gesh/.local/share/stack/config.yaml (global configuration) or
           /home/gesh/aur/1+mine/static/ormolu-static-git/src/ormolu-static-git/stack.yaml (project-level
           configuration), set allow-newer: true.
         
         * To ignore certain version constraints and build anyway, also add these package names under
           allow-newer-deps: ghc-lib-parser.
         
         * Recommended action: try adding the following to your extra-deps in
           /home/gesh/aur/1+mine/static/ormolu-static-git/src/ormolu-static-git/stack.yaml
           (project-level configuration):
           
           - filepath-1.5.4.0@sha256:099c33e0e570dad93390e1c01c1f4bc6e4f13587de8e199df3c94a6cb62c7434,4945

Note the recommendation to pin a specific version of filepath -- a boot package. However, pinning that means pinning every package depending on it (in my case, directory, process, and unix). Moreover, the intermediate states are confusing, given that despite the lts specifying e.g. unix-2.8.6.0, I still need to manually specify it in stack.yaml for it to be picked up -- as stack ls dependencies confirms (it, too, could warn on this).

(Incidentally, --allow-newer-deps didn't help here, and was actually a misnomer -- it made stack try to build against an older version of filepath than ghc-lib-parser wanted, which failed)

I expected the recommended solution to have a caveat warning the package was a boot package, and perhaps a recommendation away from respecifying boot packages

Stack version
stack --version
Version 3.5.1, Git revision 5c774d7ca92f4716ef7a51d5da21a5c3713517a5 x86_64 hpack-0.38.0
Method of installation

https://aur.archlinux.org/packages/stack-static

Platform

Arch Linux

Related: #4897

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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của commercialhaskell/stack

Tất cả issue của commercialhaskell/stack

Issue tương tự

Thêm issue về Haskell

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.