Compiling drops a hand-written about_<Module>.help.txt unless CopyDirectories names the culture directory
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- powershell
- Bereich
- build-system
Rechercherichtung
Beginne mit der Staging-Logik von Build-PSBuildModule im compile-mode und vergleiche sie mit dem Nicht-Compile-Kopierpfad. Prüfe die verwandten Issues #206 und #207, bevor du entscheidest, wie mit Culture-Verzeichnissen oder about topics umgegangen werden soll. Als erledigt gilt die Aufgabe, wenn das vereinbarte Verhalten implementiert ist, sodass ein manuell verfasstes about topic nicht mehr stillschweigend im kompilierten Paket fehlt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Found while surveying how consumers configure PowerShellBuild, for the decisions on #206 and #207. Verified in packages already published to the PowerShell Gallery, so this is affecting real modules today rather than being a hypothetical.
What happens
In compile mode, Build-PSBuildModule stages only three things into the output:
*.psm1,*.psd1and*.ps1xmlat depth 1- whatever
$PSBPreference.Build.CopyDirectoriesnames - the concatenated
*.ps1files fromCompileDirectories, written into the root module
A hand-written en-US/about_<Module>.help.txt in the source tree is none of those. It is silently left behind, and the built module ships without its about topic. The build reports success.
Non-compile mode is unaffected: it does a bulk Copy-Item $Path/* -Recurse -Force, so the whole source tree including en-US/ arrives in the output.
Evidence from published packages
Downloaded the .nupkg for five consumers that ship a hand-written about topic in source:
| Module | CopyDirectories |
About topic in the published package |
|---|---|---|
PowerShellOrg/Plaster |
@(en-US, Schema, Templates) |
ships |
PowerShellOrg/PSDepend |
@(PSDependScripts, en-US) |
ships |
diecknet/DavinciTimestamp |
not set | dropped |
poshbotio/PoshBot.FYI |
not set | dropped |
pauby/PsTodoTxt |
not set | dropped |
All five have about_*.help.txt in their source tree. The only thing separating the two groups is whether CopyDirectories happens to name the culture directory.
For the three affected modules the published en-US/ contains only the platyPS-generated MAML (<Module>-help.xml). Get-Help about_<Module> returns nothing for their users.
Why it is easy to miss
Nothing warns. The consumer sees a green build and a package that looks complete, and the file they wrote is simply absent. It is the same shape as #201 and #207 — a plausible-looking artifact with something quietly missing — and the three affected authors presumably do not know.
It is also not obvious from the settings. CopyDirectories reads as an escape hatch for extra content, not as the mechanism by which help files reach the output; a consumer who ships an about topic has no particular reason to think it applies to them.
Scope
14 of the 86 surveyed public consumers ship a hand-written about topic. Four of those compile. Three of the four are affected; the fourth (Plaster) is safe only because it sets CopyDirectories for unrelated reasons.
Options
- Stage
<Culture>/automatically in compile mode, the way*.psd1and*.psm1are staged, since a culture directory is part of a module rather than incidental content. Closest to what a consumer expects, and makesCopyDirectories = @("en-US")unnecessary rather than load-bearing. - Stage any
about_*.help.txtfound under a culture directory, narrower than (1) — it would not bringMessages.psd1or other localized data along, which some modules do want and others may not. - Warn when compiling if a culture directory exists in source and
CopyDirectoriesdoes not name it. No behavior change; makes the silent drop visible. Weakest, but the least likely to surprise anyone. - Document it in the
CopyDirectoriessettings row and the README. Cheapest; leaves three published modules broken and the next consumer to hit it none the wiser.
I lean (1). A module's culture directory carries its localized data and its about topics, and dropping it while carefully copying the manifest is hard to justify as intended behavior. But it changes what lands in the output for every compiling consumer, so it is a maintainer call.
Related: #206 and #207 are also in Build-PSBuildModule's staging logic, and #207 in particular concerns the same culture directory. Worth deciding the three together.
- Vorherrschende Sprache
- PowerShell
- Sterne
- 145
- Forks
- 26
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus psake/PowerShellBuild
-
Nothing tests the Build-PSBuildUpdatableHelp branch that deletes a consumer's output directoryOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
psake/PowerShellBuild#218 · 1 Kommentar ·
-
Staging flattens a culture directory's .psd1 into the output rootEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
psake/PowerShellBuild#211 · 1 Kommentar ·
-
CI: Install the built module from a local repository to verify install-time dependency behaviourEvtl. vergeben @tablackburn hat das vor 34 Tagen übernommen. Offenenhancement github_actions
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
psake/PowerShellBuild#229 ·
-
Test-PSBuildPester unloads a module it never importedEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
psake/PowerShellBuild#222 ·
-
Build-PSBuildMarkdown unloads a module the caller had loadedEvtl. vergeben @tablackburn hat das vor 41 Tagen übernommen. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
psake/PowerShellBuild#221 ·
Alle Issues in psake/PowerShellBuild
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
aks129/HealthClawGuardrails#917 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/build area/tech debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Bump .cicd to wamp-cicd 4c2f9ac: `just land` refuses open A18 decisions, `just where` lists themOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
crossbario/cfxdb#139 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 69/100
SpecterOps/Janus#6 · 1 Kommentar ·
-
C21 publishes `reactivemongo/core/SSL` as Java 23 bytecode — TLS connections fail on any JDK < 23Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
ReactiveMongo/ReactiveMongo#1520 ·
Maintainer antworten meist innerhalb von 1 Tag