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
Docs: show the generated code for the simple cases in the READMEs #92
The READMEs say what the generators add in words and a list: the constructor, Value, the factories, equality, a JSON converter and so on. Gaël Fraiteur of Metalama suggested, after reading the source in the Show and tell discussion (discussion 2305, his comment), showing the generated code for simple cases in the README. It helps understanding without having to parse much text. Thank you; it is good advice.
Proposal
For OrderId : IValue<Guid> and the Email validated value object, a short block of the real generated code, trimmed to what a reader needs (the field, the constructor, Value, From, TryFrom, FromKnownGood, equality). It goes in the root README and the Generators README, next to where they declare a value object. A collapsed <details> block for the longer one, and one for a closed set, would keep the page short.
Done when
The code shown is what a build with MetalamaEmitCompilerTransformedFiles emits for those declarations, and a conventions test fails when a README block no longer matches. (Refined 2026-10-28: the emitted code is fully qualified, with attributes and casts everywhere, so the blocks are trimmed, and GeneratedCodeBlockTests compares each member shown, body included, with the emitted one after both lose attributes, comments, namespace qualifiers, casts and this.. PR docs: the READMEs show the generated code for OrderId, Email and a closed set #104.) The blocks are not compiled code (they repeat a partial declaration), so each says <!-- not compiled: ... --> and ReadmeSampleTests does not cover them.
The plain-docs voice is kept: example first, plain words.
Activity
CaffeinatedCoder commentedon Oct 28, 2026
Done in PR #104, merged into release/2.3.0.