Skip to content

test+docs: cover type aliases, document -schemaHash#8

Open
klaidliadon wants to merge 1 commit into
webrpc:masterfrom
klaidliadon:docs/schema-hash-alias
Open

test+docs: cover type aliases, document -schemaHash#8
klaidliadon wants to merge 1 commit into
webrpc:masterfrom
klaidliadon:docs/schema-hash-alias

Conversation

@klaidliadon

Copy link
Copy Markdown
Contributor

Two release-readiness fixes for gen-c:

  1. Type-alias coverage — alias rendering was implemented across the templates but never exercised by the smoke example. Added type UserID: uint64 and a userId: UserID field to _examples/smoke/example.ridl, regenerated the committed goldens. The alias resolves to its base type as a struct field (uint64_t user_id) and round-trips through the JSON codec (cJSON_CreateNumber / decode). make diff now guards the alias path.
  2. Docs — documented the -schemaHash opt-out in the README options table.

Regenerated with the pinned tool (webrpc-gen v0.37.2) via make -C _examples generate; both example.gen.h and example.gen.c are committed and pass make diff against the regenerated output.

Note: the README "Version" cell says v0.1.6 — this flag (and the alias coverage) ships in the next tag. The -schemaHash feature itself is currently unreleased on master (1 commit past v0.1.5); this PR should land before / with the v0.1.6 cut.

Part of the cross-generator sweep documenting -schemaHash and closing type-alias coverage gaps.

- add `type UserID: uint64` alias to the smoke example and regenerate the
  committed goldens; the alias resolves to its base type as a struct field
  (`uint64_t user_id`) and round-trips through the JSON codec. Alias
  rendering previously had no example/golden coverage.
- document the -schemaHash opt-out in the README options table (v0.1.6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant