Skip to content

fix: ship XML documentation in every package (#156) - #158

Merged
swimmesberger merged 1 commit into
mainfrom
claude/xml-documentation-156
Sep 20, 2026
Merged

swimmesberger merged 1 commit into
mainfrom
claude/xml-documentation-156

Conversation

@swimmesberger

Copy link
Copy Markdown
Owner

Closes #156.

Directory.Build.props never set GenerateDocumentationFile, so every published package contained only the assembly and consumers got no IntelliSense, hover text or parameter help for any Elarion API. That surface matters more here than usual: handlers, source generators and analyzers mean the API is discovered rather than browsed, and a coding agent in a consuming repo reads exactly the metadata IntelliSense reads.

What changed

A new src/Directory.Build.props enables it for everything under src/, so tests, benchmarks and samples — which document nothing and would have contributed ~2,600 CS1591 — are unaffected. The SDK packs $(AssemblyName).xml into lib/$(TargetFramework) on its own: 53 of the 54 packages that ship a lib/ assembly now carry one.

The issue anticipated needing a blanket NoWarn CS1591. It turned out not to: the shipped source is almost fully documented. Only 26 missing comments in packable projects (JsonRpcIdKind/JsonRpcIdInfo, the HTTP body binder's BodyFailure, SqlInterpolatedStringHandler, SqlStatement.ToString, the stream decorators, ElarionSqlJsonInstaller, ElarionFileJsonConverter) plus 20 generator Initialize overrides, all filled in.

Turning documentation on also surfaced ~48 doc defects that had been invisible, including crefs to members that no longer exist:

  • TcpConnectionHandler.ConfigureConnectionAsync and WebSocketConnectionHandler.ConfigureConnectionAsync — per-connection settings come from Settings on the session types
  • TcpOutboundWriter.WriteFrameAsync — never existed; the mirror is the batched drain loop
  • IAuthorizationPolicy.Name — the name lives on [AuthorizationPolicy] or the registration call, as that interface's own summary says

plus crefs that never resolved across the Abstractions/core boundary (the pipeline decorators live in core, which Abstractions must not reference) and paramref/typeparamref tags naming parameters their type does not have.

Beyond the issue

Generated code now emits #pragma warning disable CS1591 after #nullable enable. Without it, a consumer who acts on this very issue and turns on GenerateDocumentationFile inherits 156 warnings from Elarion's own generated output — as errors, under their TreatWarningsAsErrors.

Unrelated, but blocking

Microsoft.SourceLink.GitHub was pinned at 10.0.300, which pulls Microsoft.Build.Tasks.Git 10.0.300 — now flagged by CVE-2026-62900 (GHSA-23fw-v26w-5fgq). With NuGetAudit and TreatWarningsAsErrors that is 108 NU1902 build errors and 3 test failures on main today, independent of this change. Bumped to 10.0.401 (patched from 10.0.303) so the validation baseline can run at all.

Verification

  • dotnet build Elarion.slnx -c Release — warning-free, with TreatWarningsAsErrors and audit both on
  • dotnet test — 2047/2047 pass
  • dotnet pack — clean; analyzer assets still pack correctly alongside the new .xml

Directory.Build.props never set GenerateDocumentationFile, so every
published package contained only the assembly and consumers got no
IntelliSense, hover text or parameter help for any Elarion API. That
surface matters more here than usual: handlers, source generators and
analyzers mean the API is discovered rather than browsed, and a coding
agent in a consuming repo reads exactly the metadata IntelliSense reads.

Enable it for everything under src/ via a new src/Directory.Build.props,
so tests, benchmarks and samples — which document nothing and would have
contributed ~2,600 CS1591 — are unaffected. The SDK packs
$(AssemblyName).xml into lib/$(TargetFramework) on its own; 53 of the 54
packages that ship a lib/ assembly now carry one.

The shipped source turned out to be almost fully documented, so no
blanket NoWarn CS1591 was needed: 26 missing comments in packable
projects (JsonRpcIdKind/JsonRpcIdInfo, the HTTP body binder's
BodyFailure, SqlInterpolatedStringHandler, SqlStatement.ToString, the
stream decorators, ElarionSqlJsonInstaller, ElarionFileJsonConverter)
plus 20 generator Initialize overrides, all filled in.

Turning documentation on also surfaced ~48 doc defects that had been
invisible, including crefs to members that no longer exist —
TcpConnectionHandler.ConfigureConnectionAsync,
WebSocketConnectionHandler.ConfigureConnectionAsync,
TcpOutboundWriter.WriteFrameAsync and IAuthorizationPolicy.Name — crefs
that never resolved across the Abstractions/core boundary (the pipeline
decorators live in core, which Abstractions must not reference), and
paramref/typeparamref tags naming parameters their type does not have.

Generated code now emits `#pragma warning disable CS1591` after
`#nullable enable`, so a consuming project that enables
GenerateDocumentationFile is not warned about Elarion's own output — the
same 156 warnings this change would otherwise have pushed onto every
consumer that acts on it.

Also bumps Microsoft.SourceLink.GitHub 10.0.300 -> 10.0.401: the pinned
version pulls Microsoft.Build.Tasks.Git 10.0.300, which CVE-2026-62900
(GHSA-23fw-v26w-5fgq) now flags, and NuGetAudit + TreatWarningsAsErrors
turns that into 108 NU1902 build errors and three test failures. It is
unrelated to this change but blocks the validation baseline.

Verified: dotnet build (warning-free, TreatWarningsAsErrors on, audit
on), 2047/2047 tests pass, dotnet pack clean.
@swimmesberger
swimmesberger added this pull request to stack #160 September 20, 2026 12:22
@swimmesberger
swimmesberger merged commit 9eeb224 into main Sep 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Packages ship no XML documentation file, so the (excellent) doc comments never reach consumers

1 participant