mirror of
https://github.com/logos-co/logos-cpp-sdk.git
synced 2026-08-31 17:51:07 +00:00
The emission needed no new code: lidl::serialize already writes `type` blocks —
that is how chat_module's hand-written contract round-trips — so the missing half
really was the impl-header parser producing ModuleDecl.types. Verified against
the real generator, which now publishes
type Status {
port: uint
name: tstr
blob: bstr
}
method describeStatus(s: Status) -> tstr
method makeStatuses() -> [Status]
for a module whose header declares `struct Status { uint64_t port; std::string
name; std::vector<uint8_t> blob; };` — the methods reference the record by name
rather than degrading to an opaque map.
The test pins the whole path (parser -> ModuleDecl.types -> serializer) so a
change in the serializer cannot silently drop records from published contracts,
which would leave consumers with nothing to generate typed wrappers from and no
build failure to notice it.
Tests: 176/176.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>