Repository navigation
build(release): the rehearsal measures Description and the package's tags against the Gallery's limits - #14
Merged
fadwen merged 1 commit intoOct 6, 2026
Conversation
fadwen
commented
Oct 6, 2026
fadwen
left a comment
Owner
Author
There was a problem hiding this comment.
Notes on the lines whose reason the diff does not show.
| } | ||
|
|
||
| # NuGet's limit on a package description, which the Gallery applies. | ||
| $descriptionLimit = 4000 |
Owner
Author
There was a problem hiding this comment.
The one limit of the three the Gallery has not stated to this module. 4,000 is the length of the NuGet gallery's description column, and the figure the Gallery quoted for tags in PowerShell/PowerShellGetv2#344.
| $text = switch ($Field) { | ||
| 'ReleaseNotes' { "$($manifest.ReleaseNotes)" } | ||
| 'Description' { "$($manifest.Description)" } | ||
| 'Tags' { |
Owner
Author
There was a problem hiding this comment.
Repeated rather than dot-sourced from Build/Publish-Module.ps1: that script requires PowerShell 7.4 and PSResourceGet and runs its gates on load, and this test runs under Windows PowerShell 5.1 too.
fadwen
added this pull request to stack #15
October 6, 2026 06:46
…tags against the Gallery's limits The Gallery refused 0.27.0's first upload over the length of ReleaseNotes, and the rehearsal has measured that field since. Two more fields carry a limit it enforces, NuGet's 4,000 characters: the Description, and the package's tags, which are not the manifest's alone. The publish adds PSModule, a PSEdition_ tag per compatible edition, PSFunction_ and PSCommand_ for every exported function, and PSIncludes_Function; that is the list the Gallery shows for 0.27.0, 61 tags and 1,935 characters for 27 commands, so each new command costs about twice its name. Build/Publish-Module.ps1 builds that list from the manifest, measures all three fields, refuses a manifest over a limit and reports the three lengths. The module contract test holds the same three limits, so a pull request fails before the tag-driven release does.
fadwen
force-pushed
the
build/gallery-metadata-limits
branch
from
October 6, 2026 06:52
0fa27ab to
2bb7005
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Gallery refused 0.27.0's first upload because
ReleaseNoteshad passed 10,600 characters, and since #8 the release rehearsal measures that field. Two more fields carry a limit the Gallery enforces, NuGet's 4,000 characters: the manifest'sDescription, and the package's tags. The tags are not the manifest's alone. The publish addsPSModule, aPSEdition_tag per compatible edition,PSFunction_andPSCommand_for every exported function, andPSIncludes_Function. That is the list the Gallery shows for 0.27.0: 61 tags, 1,935 characters for 27 commands, so each new command costs about twice its name, and a module that keeps adding commands reaches the limit without touching itsTagskey (PowerShellGetv2 #344 is a module that did: "A nuget package's Tags property may not be more than 4000 characters long").Stacked on #13 (base branch), which is stacked on #12, #11 and #10; the diff is this change only. Merge #10, #11, #12, #13, then this; GitHub retargets each to
mainas its parent merges and the checks run then.Changes
Build/Publish-Module.ps1.Get-PublishedTagbuilds the tag list the way the publish does, from the manifest'sTags,CompatiblePSEditionsandExportedFunctions. The rehearsal refuses a manifest whoseDescription, tags orReleaseNotespass its limit and reports the three lengths:Gallery metadata: Description 179/4000, Tags 1935/4000, ReleaseNotes 2673/10600 characters.Tests/Unit/Module.Contract.Tests.ps1. The same three limits, so a pull request fails before the tag-driven release does.Verification
Get-PublishedTagbuilds for the current manifest is the Gallery's list for 0.27.0, compared withFind-PSResourceas a set: the same 61 tags, 1,935 characters.Build/Publish-Module.ps1 -WhatIfpasses and prints the three lengths. The contract test passes on PowerShell 7.6.6 and Windows PowerShell 5.1 (15 of 15). PSScriptAnalyzer (Error and Warning) is clean on the two changed files; no line over 115 characters.Notes
ReleaseNotes. A module with cmdlets or DSC resources would see further automatic tags (PSCmdlet_,PSDscResource_); this module exports functions only, and the helper builds what it exports.