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-swift:

  1. Type-alias test coverage — the template renders type Name: Base as a Swift typealias, but nothing exercised it (no alias in the test schema, no assertion). Added type UserID: uint64 to Tests/test.ridl and a test asserting it resolves to the underlying type and is usable as a request field.
  2. Docs — documented the -schemaHash opt-out in the README options table.

Tests/Sources/Generated/Generated.swift is gitignored and regenerated by Tests/test.sh in CI, so it isn't committed. I regenerated locally with the pinned tool (webrpc-gen v0.37.2) and confirmed the output:

public typealias UserID = UInt64

I could not run swift test locally (no Swift toolchain in my env) — CI's Tests/test.sh regenerates and compiles/exercises the alias. Flagging that explicitly rather than claiming the Swift suite passed.

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

- add `type UserID: uint64` alias to Tests/test.ridl and a test asserting
  it renders as a typealias to the underlying type and is usable as a
  request field — alias rendering previously had zero coverage
- document the -schemaHash opt-out in the README options table

Generated.swift is gitignored and regenerated by Tests/test.sh in CI,
where `swift test` compiles and exercises the alias.
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