Compile and non-compile modes disagree on whether the readme or a source about file wins
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- powershell
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu tại Build-PSBuildModule và theo dõi khối readme, thao tác sao chép source hàng loạt và CopyDirectories trong cả hai chế độ CompileModule. Tái hiện xung đột khi ConvertReadMeToAboutHelp được bật và có một tệp about dành riêng cho culture được viết thủ công, sau đó xem xét các issue liên quan #207, #210 và #211. Được xem là hoàn tất khi hành vi về thứ tự ưu tiên hoặc cảnh báo đã được lựa chọn một cách có chủ đích và nhất quán trong cả hai chế độ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while researching #207, and only visible once that issue is fixed.
The disagreement
Both modes can produce <Culture>/about_<Module>.help.txt, from two different sources, and they resolve the conflict differently — by accident of statement ordering rather than by design.
Non-compile mode. The readme block runs, then the bulk stage copies the whole source tree:
Copy-Item -Path (Join-Path $Path "*") -Destination $DestinationPath -Recurse -Force
That runs after, so a hand-written en-US/about_<Module>.help.txt in source overwrites the readme-derived one. Source wins.
Compile mode. There is no bulk copy. Once #207 is fixed the readme copy runs unconditionally, and the source about file only reaches the output if CopyDirectories names the culture directory — in which case CopyDirectories runs before the readme block. The readme wins.
So the same two inputs give opposite results depending on a setting that has nothing to do with help.
How to see it
Set ConvertReadMeToAboutHelp = $true and ship a hand-written en-US/about_<Module>.help.txt, then build twice, changing only CompileModule. In non-compile the hand-written text survives; in compile (post-#207) the readme replaces it.
Measured this way while validating the #207 fix. On main today the compile case produces no about file at all, so the disagreement is masked by the bug rather than absent.
Is either answer right?
Arguable both ways, which is why this is its own issue rather than a line in #207:
- Source should win. A consumer who hand-wrote a conformant about topic has expressed a clear preference, and a Markdown readme is not a conformant about topic — it satisfies none of the
TOPIC/ four-space-indent structureGet-Helpdocuments. Overwriting the good one with the bad one is the worse outcome. - The readme should win.
ConvertReadMeToAboutHelp = $trueis an explicit instruction. Silently ignoring it because a file happens to exist is how #207 happened in the first place. - The combination is contradictory and deserves a warning rather than a silent winner either way.
What is not defensible is the current state, where the answer depends on CompileModule.
Scope
Narrow today. Of 86 surveyed public consumers, none sets ConvertReadMeToAboutHelp through $PSBPreference; the only users reach it by calling Build-PSBuildModule directly. 14 ship a hand-written about topic. No consumer is known to do both, so nobody is hitting this now.
Worth settling anyway, because #207 makes the compile-mode behavior real for the first time, and it is cheaper to decide the precedence deliberately now than to discover it later as a surprise.
Related
#207 (the readme copy being skipped), #210 (a source about file being dropped entirely in compile mode), #211 (culture-directory files flattened into the output root). All four are the same staging logic; the precedence question here only becomes answerable once the other three are settled.
- Ngôn ngữ chính
- PowerShell
- Star
- 145
- Fork
- 27
- Merge trung bình
- 10 giờ 16 phút
- Pull request đã merge (30 ngày)
- 34
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 psake/PowerShellBuild
-
Nothing tests the Build-PSBuildUpdatableHelp branch that deletes a consumer's output directory Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
psake/PowerShellBuild#218 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
psake/PowerShellBuild#211 · 1 bình luận ·
-
CI: Install the built module from a local repository to verify install-time dependency behaviour Đang mởenhancement github_actions
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
psake/PowerShellBuild#229 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
psake/PowerShellBuild#222 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
psake/PowerShellBuild#221 ·
Tất cả issue của psake/PowerShellBuild
Issue tương tự
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
kubernetes-sigs/prow#953 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
out-of-date
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
CachyOS/CachyOS-PKGBUILDS#1894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
comp/dashboard P3 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NousResearch/hermes-agent#117722 ·