build(binder): dogfood the FCExxx analyzers on the binder - #182
Merged
Conversation
Reefact
force-pushed
the
claude/issue-153-explanation-mtznkx
branch
from
July 18, 2026 12:51
220c8d2 to
a902349
Compare
A ProjectReference to FirstClassErrors carries the runtime library but not the analyzers bundled in its NuGet package, so the binder's [ProvidesErrorsFor] / [DocumentedBy] error documentation was the one place in the repository not enforced at compile time — only exercised by reflection in BindingContractTests. Reference the analyzer project explicitly (OutputItemType=Analyzer, ReferenceOutputAssembly=false, PrivateAssets=all), mirroring Usage and GenDoc, so a break in that wiring fails the build like everywhere else. A guard test pins the reference so it cannot silently disappear. Refs: #153 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gg4ecN69YmG1yMaW45hGtH
Reefact
force-pushed
the
claude/issue-153-explanation-mtznkx
branch
from
July 18, 2026 13:04
a902349 to
bd80f0e
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
Wire the
FirstClassErrorsFCExxx analyzers into the RequestBinder project so its error documentation is enforced at compile time, like the rest of the repository. The binder referencesFirstClassErrorsvia aProjectReference, which — unlike the NuGet package — does not carry the bundled analyzers, soRequestBindingError's[ProvidesErrorsFor]/[DocumentedBy]wiring was the one place not analyzer-checked (only exercised by reflection inBindingContractTests).Type of change
Changes
ProjectReferencetoFirstClassErrors.AnalyzersinFirstClassErrors.RequestBinder.csprojwithOutputItemType="Analyzer"(runs the analyzers at build/IDE time),ReferenceOutputAssembly="false"(off the runtime graph), andPrivateAssets="all"(kept out of the published package's dependency graph, since the binder is packed — matching the main library's treatment).AnalyzerDogfoodingTeststo the binder's unit tests: a guard that reads the binder.csprojand asserts the analyzer reference stays present and correctly shaped (OutputItemType=Analyzer,ReferenceOutputAssembly=false,PrivateAssets=all), so the wiring cannot silently disappear.Testing
dotnet build FirstClassErrors.sln— succeeds, 0 warnings / 0 errors.dotnet test FirstClassErrors.sln— not run in full; randotnet test FirstClassErrors.RequestBinder.UnitTestsinstead: 90/90 passed, including the 2 new guard tests.FirstClassErrors.Analyzers.UnitTests) — not run; this PR does not modify the analyzers.Additional manual verification: temporarily pointed a
[DocumentedBy]at a non-existent method to confirm the wiring is live — the binder build then failed witherror FCE006([DocumentedBy] cannot be resolved) and passed again once reverted. This confirms the analyzers actually run on the binder, not merely that the reference is declared.Documentation
doc/updateddoc/handwritten/for-users/README.fr.md) updated if user-facing behavior changedanalyzers.ymlworkflow is not modified. The binder's dogfooding is enforced by the full-solution build inci.Architecture decisions
FirstClassErrors.UsageandFirstClassErrors.GenDoc) to the binder. No conflict with ADR 0001 (the Roslyn floor is untouched).Proposed: ADR-____Related issues
Closes #153
🤖 Generated with Claude Code
https://claude.ai/code/session_01Gg4ecN69YmG1yMaW45hGtH
Generated by Claude Code