chore: centralize doc-gen in Directory.Build.targets, align CI with plumber - #13
Merged
Conversation
…lumber Adopt the canonical Directory.Build.targets so documentation generation is a repo-wide rule rather than a per-project setting. Doc-gen is imported at the bottom of every project, where IsTestProject/OutputType/IsPackable are already set by the project body — a condition that cannot work from Directory.Build.props, which is imported before them. The condition carries an IsPackable guard beyond plumber's copy. Without it, samples/Smtp.Pool (IsPackable=false, but a library rather than an Exe) picks up doc-gen and fails CS1591 on SmtpConnection.Dispose() under TreatWarningsAsErrors. Packages document themselves; samples do not. Align CI with plumber, the canonical NuGet-library pattern: - workflow name ".NET Test" -> ".NET Tests"; job "tests" -> "test" - add Directory.Build.targets and .gitattributes to the path filters, so a change to either actually triggers the test workflow - restore explicitly, then build/test with --no-restore off the root solution - pack the solution rather than the csproj; IsPackable already scopes it to MSL.Pool - pin the coverage artifact to tests/Pool.Tests rather than a tests/** glob Re-encode dotnet.tests.yml and dotnet.publish.yml as valid UTF-8. Both carried a cp1252 0x97 byte where an em dash belongs, which is not valid UTF-8. Verified: format clean, 144 tests pass in Debug and Release, and the packed nupkg contains lib/net10.0/Pool.xml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Brings pool current with plumber, the canonical NuGet-library pattern.
Directory.Build.targets
Documentation generation moves from a per-project
<GenerateDocumentationFile>insrc/Pool/Pool.csprojto a repo-wide rule inDirectory.Build.targets.It has to be a
.targetsfile, not.props: the condition testsIsTestProject,OutputType, andIsPackable, which each project sets in its own body..propsis imported before that body, so those properties would still be empty and every condition would misfire..targetsis imported after.The condition carries an
IsPackableguard beyond plumber's copy:Plumber's version excludes only tests and executables. Applied to pool verbatim it fails the build —
samples/Smtp.PoolisIsPackable=falsebut is a library, so it picks up doc-gen and errorsCS1591onSmtpConnection.Dispose()underTreatWarningsAsErrors. Packages document themselves; samples don't. This variant is already in lexi.Net effect on the shipped package is nil —
MSL.Poolwas already generating docs. This centralizes the rule so new packable projects inherit it.CI alignment with plumber
.NET Test→.NET Tests; jobtests→testDirectory.Build.targetsand.gitattributesdotnet restore, then build/test with--no-restoreoff the root solutionIsPackablealready scopes it toMSL.Pooltests/Pool.Tests/rather than atests/**glob.github/actions/setup-dotnet/action.ymlnow byte-identical to plumber'sPool.slnxcontains only the library, its unit tests, and the sample. The Docker-dependent integration suite lives insamples/Smtp.Pool.slnxand stays out of CI — baredotnet buildresolves the root solution, so that exclusion is preserved.Encoding fix
dotnet.tests.ymlanddotnet.publish.ymleach carried a cp12520x97byte where an em dash belongs — not valid UTF-8. Both re-encoded.Verification
dotnet format --verify-no-changescleanlib/net10.0/Pool.xml(50 KB) and packs onlyMSL.Pool🤖 Generated with Claude Code