`--haddock-executables` index does not distinguish `Main` modules

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

@mpilgrem đang làm issue này rồi.

Từ ngày 9/3/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

resolution: upstream issue type: bug

Version 2.16.0, Git revision 1817292f22987cc764a72146cf707f028c575bf5 (10654 commits) PRE-RELEASE x86_64 has --haddock-executables (built on top of Cabal (the library)'s haddock --executables), but there are problems with the index.

Consider a two-package project (packageA, packageB) each with two executable components (eg packageA-exe1, packageA-exe2). The index generated for project packages has four links to Main but all of them are to the Main of packageB-exe1.

Using haddock --show-interface reveals that all four *.haddock files commence:

{"link_env":{"$main$Main$main":"Main", ...

That can be contrasted with the two *.haddock files for the main library:

{"link_env":{"$packageA-0.1.0.0-ErEp6QMCDA5L7wclG18d4W$Lib$someFunc":"Lib"}, ...

and

{"link_env":{"$packageB-0.1.0.0-LJmkqLQIxknEQ7YIpA65Ah$Lib$someFunc":"Lib"}, ...

--cabal-verbosity 3 reveals that, with the main library, Cabal (the library) invokes Haddock with options that include:

packageA> --optghc=-this-unit-id
packageA> --optghc=packageA-0.1.0.0-ErEp6QMCDA5L7wclG18d4W

packageB> --optghc=-this-unit-id
packageB> --optghc=packageB-0.1.0.0-LJmkqLQIxknEQ7YIpA65Ah

There is no equivalent for when Cabal invokes Haddock for the executable components.

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.