Skip to content

chore: write each package's changelog section into its NuGet release notes (10.x) - #348

Open
CaffeinatedCoder wants to merge 1 commit into
release/10.xfrom
chore/346-release-notes-from-changelog-10.x
Open

CaffeinatedCoder wants to merge 1 commit into
release/10.xfrom
chore/346-release-notes-from-changelog-10.x

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Closes #346

The 10.x half of #346: a git cherry-pick -x of #347 commit (a86ae01), which has green CI on main. The closing keyword is here only because pr-hygiene.sh requires one on every PR, as on #339. Against release/10.x it closes nothing; #347 closes the issue on main.

Problem

PackageReleaseNotes is a link to blob/main/src/<package>/CHANGELOG.md. nuget.org's Release Notes tab and Visual Studio's Updates tab show that field, frozen per version, so a 10.x package sends its reader to main's changelog of the day instead of the notes for that version.

Change

The same change as #347. The rendering measurements, the design and the full seed table are there.

  • Directory.Build.targets (new): before GenerateNuspec, pack writes the ## [$(Version)] section of the package's own CHANGELOG.md as release notes. nuget.org shows release notes as plain text and links only bare URLs (measured, see chore: write each package's changelog section into its NuGet release notes #347), so the notes are written in plain text: [text](url) becomes text (url), and backticks, ** and ### are dropped. A footer line links blob/v$(Version)/src/<package>/CHANGELOG.md at the version's immutable tag. Pack fails, naming the file, when the section is missing, empty or doubled, or the notes exceed 35,000 characters.
  • Directory.Build.props: the link is removed.
  • PackagingConventionTests: the link test is replaced by EveryPackage_ShipsItsVersionsChangelogSectionAsReleaseNotes, which generates each nuspec through NuGet's pack task and compares it with the section, and by Pack_FailsNamingTheChangelog_WhenTheSectionCannotBeTheReleaseNotes (missing, empty, doubled, too long).
  • test/consumer-smoke-test.sh: the script reads each .nupkg's release notes, which must hold the section's first line, the tag footer and no Markdown.
  • AGENTS.md, CONTRIBUTING.md, docs/testing.md: as on main.

Conflicts resolved:

  • AGENTS.md: kept 10.x's text (no 11-line notes, the SMOKE_AOT_SDK and test/Directory.Build.targets bullets) and applied the two release-notes sentences to it.
  • test/consumer-smoke-test.sh: 10.x has no finish() helper, so the block was added without it.

No changelog line on this line. release/10.x's Directory.Build.props is at 10.1.0, which is tagged and released, and no next 10.x version or milestone has been opened. A line under the released ## [10.1.0] would describe a package that does not have it. The line goes into the next 10.x section when that version is opened (## [10.2.0], or whatever is opened). Until then, a pack here writes 10.1.0's section, which is what 10.1.0 would have shipped. No milestone, for the same reason: the 10.1.0 milestone is a released version.

Tests

Locally on SDK 10.0.303, unit and convention suites as CI runs them: 2,531 passed, 0 failed (Conventions 410, core 1,397, EF 303, NodaTime 238, AspNetCore 92, EF NodaTime 91).

Seeds re-run on this branch (apply, run PackagingConventionTests, git reset --hard):

  • The target reading 10.0.0's section instead of $(Version)'s fails EveryPackage_ShipsItsVersionsChangelogSectionAsReleaseNotes and the four Pack_Fails… rows.
  • A missing section that no longer fails the pack fails Pack_Fails…("missing").

The other six seeds (the old link wiring, a missing changelog section, kept backticks, the dropped length limit, a blob/main footer, AfterTargets) are in #347 and run against identical code.

🤖 Generated with Claude Code

…notes

PackageReleaseNotes linked blob/main/src/<package>/CHANGELOG.md, so nuget.org's
Release Notes tab and Visual Studio's Updates tab sent a reader of any version
to today's file. Pack now writes the version's section of the package's own
changelog (Directory.Build.targets, before GenerateNuspec), in plain text
because nuget.org renders release notes as typed and links only bare URLs,
with a footer linking the changelog at the version's tag. Pack fails naming
the file on a missing, empty, doubled or over-35,000-character section.

PackagingConventionTests generates every package's nuspec through NuGet's
pack task and compares releaseNotes with the section; the smoke test checks
the .nupkg itself.

Refs #346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a86ae01)
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, packaging, refactoring with no behaviour change package/nodatime Affects CodoMetis.ValueRanges.NodaTime package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL area/release Versioning, changelogs, release wiring package/core Affects CodoMetis.ValueRanges package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime labels Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring chore Build, CI, packaging, refactoring with no behaviour change package/core Affects CodoMetis.ValueRanges package/efcore Affects CodoMetis.ValueRanges.EFCore.PostgreSQL package/efcore-nodatime Affects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime package/nodatime Affects CodoMetis.ValueRanges.NodaTime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant