You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ba31b9f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(codegen): C# generators declare what they require; a template spec alone is a selection
Two defects, found while fixing the Python quickstart's routes gap for C#.
1. C# had no `requires`. `--generators entity,routes` emitted handlers that reference
AppDbContext and <Entity>FilterAllowlist and did not compile, with no warning. The
registry entry gains `Requires`: routes needs entity, db-context and filter-allowlist;
db-context needs entity; output-parser, extractor and render-helper need entity
(ADR-0056). `gen` warns when one is missing, with the text TS and Python use, and
`--list` shows "(requires: ...)". Advisory, as in the other ports.
2. C# gen and Python gen refused a project that selects generators only through a
template spec ("no generators selected"), because the empty-selection check ran
before the spec was resolved. The documented `gen --template-root` examples failed as
printed. C# verify had the mirror defect: it returned clean before discovering the
spec, so a spec-only project's drift gate checked nothing. Both checks now run after
spec resolution. Python verify already did this.
C# `gen` also stops reporting an empty selection as "metadata did not load cleanly"; it is
a usage error, exit 2, as in Python. docs/ports/csharp.md's first gen example named no
generators and wrote nothing; it now names the suite and says what routes requires.
Tests: C# registry (Requires, UnsatisfiedRequires), --list shows requires, and three
spec-only tests (gen not refused, verify catches an edited spec file, no selection is
still refused); Python spec-only gen and refusal. The spec-only tests fail without the
fix. C# CLI 122/0, Codegen 572/0; Python 2299/0; ci-local --quick green.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1mRRB1K2WdYy82kntMQdx
0 commit comments