fix: ship XML documentation in every package (#156) - #158
Merged
Merged
Conversation
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.
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.
Closes #156.
Directory.Build.propsnever setGenerateDocumentationFile, 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.propsenables it for everything undersrc/, so tests, benchmarks and samples — which document nothing and would have contributed ~2,600CS1591— are unaffected. The SDK packs$(AssemblyName).xmlintolib/$(TargetFramework)on its own: 53 of the 54 packages that ship alib/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'sBodyFailure,SqlInterpolatedStringHandler,SqlStatement.ToString, the stream decorators,ElarionSqlJsonInstaller,ElarionFileJsonConverter) plus 20 generatorInitializeoverrides, all filled in.Turning documentation on also surfaced ~48 doc defects that had been invisible, including crefs to members that no longer exist:
TcpConnectionHandler.ConfigureConnectionAsyncandWebSocketConnectionHandler.ConfigureConnectionAsync— per-connection settings come fromSettingson the session typesTcpOutboundWriter.WriteFrameAsync— never existed; the mirror is the batched drain loopIAuthorizationPolicy.Name— the name lives on[AuthorizationPolicy]or the registration call, as that interface's own summary saysplus crefs that never resolved across the Abstractions/core boundary (the pipeline decorators live in core, which Abstractions must not reference) and
paramref/typeparamreftags naming parameters their type does not have.Beyond the issue
Generated code now emits
#pragma warning disable CS1591after#nullable enable. Without it, a consumer who acts on this very issue and turns onGenerateDocumentationFileinherits 156 warnings from Elarion's own generated output — as errors, under theirTreatWarningsAsErrors.Unrelated, but blocking
Microsoft.SourceLink.GitHubwas pinned at10.0.300, which pullsMicrosoft.Build.Tasks.Git 10.0.300— now flagged by CVE-2026-62900 (GHSA-23fw-v26w-5fgq). WithNuGetAuditandTreatWarningsAsErrorsthat is 108NU1902build errors and 3 test failures onmaintoday, independent of this change. Bumped to10.0.401(patched from10.0.303) so the validation baseline can run at all.Verification
dotnet build Elarion.slnx -c Release— warning-free, withTreatWarningsAsErrorsand audit both ondotnet test— 2047/2047 passdotnet pack— clean; analyzer assets still pack correctly alongside the new.xml