speckl/compiler
Scott Scoble 0ab3174314 feat(speckl): state as <Name> message override (cycle 59)
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.
2026-06-28 21:55:54 -07:00
..
__tests__ feat(speckl): state as <Name> message override (cycle 59) 2026-06-28 21:55:54 -07:00
dist feat(protobuf): honor speck.protoPackage and speck.goPackage overrides 2026-06-28 21:49:19 -07:00
node_modules TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
out/speckl-compile feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
specs feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
src feat(speckl): state as <Name> message override (cycle 59) 2026-06-28 21:55:54 -07:00
test-output TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
test-output-rust/TigerBeetleLedger feat(rust): Rust codegen backend (speckl#24) 2026-05-09 23:24:40 -07:00
.gitignore Add .gitignore for compiler dependencies and build artifacts 2026-04-29 15:12:37 -07:00
.last-build fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
check-dist.sh fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
package-lock.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
package.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
tsconfig.json Add SpeckDL compiler scaffold 2026-04-29 15:12:08 -07:00