Adds 'state as <MessageName> { ... }' syntax for the .proto generator.
When the 'as' clause is present, the generator emits
message <MessageName> { ... }
instead of the default
message <SpeckName>State { ... }.
Why: the federated-meetup consumer (internal/types/types.go and friends)
imports 'pb.StateSnapshot', not 'pb.FederatedMeetupState'. The previous
default of namespacing by speck name broke the migration: the generated
proto would have compiled cleanly in protoc but the consuming Go code
would not have built. With this override, the Speckl-generated proto
emits the exact message name the consumer expects.
The default behavior (no 'as' clause) is unchanged, so existing specs
that relied on the old convention (e.g. tests, examples) still work.
Tests: 2 new parser tests, both green. All 48 tests pass. tsc build clean.
Reference: .hermes/skills/spec-compiler-dogfood/references/
speckl-federated-meetup-protobuf-migration.md
— the build break last session was caused by the missing override.
|
||
|---|---|---|
| .. | ||
| __tests__ | ||
| dist | ||
| node_modules | ||
| out/speckl-compile | ||
| specs | ||
| src | ||
| test-output | ||
| test-output-rust/TigerBeetleLedger | ||
| .gitignore | ||
| .last-build | ||
| check-dist.sh | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||