Skip to content

fix: keep schema hash on by default, omit via -schemaHash=false#59

Merged
klaidliadon merged 1 commit into
masterfrom
fix/schema-hash-opt-out
Jun 19, 2026
Merged

fix: keep schema hash on by default, omit via -schemaHash=false#59
klaidliadon merged 1 commit into
masterfrom
fix/schema-hash-opt-out

Conversation

@klaidliadon

Copy link
Copy Markdown
Contributor

v0.27.0 flipped the schema-hash default to off (opt-in). webrpc's maintainer wants the hash to stay on by default and always show up in PRs, so this restores hash-on by default and makes omission opt-out via -schemaHash=false instead. Net vs the last good release (v0.26.0): identical default output, plus the new opt-out. Ships as v0.28.0.


Behavior

  • default / -schemaHash: hash in the header + WebrpcVersion / WebrpcSchemaVersion / WebrpcSchemaHash (pre-v0.27.0 output).
  • -schemaHash=false: omits the hash from the header comment and the three constants. The DO NOT EDIT line stays.

Test plan

$ git diff origin/master -- _examples   # hash + 3 consts restored
$ webrpc-gen … -schemaHash=false          # omits hash + consts

v0.27.0 made schema hash emission opt-in (default off), a breaking change for
consumers that rely on the hash and version constants. Restore the hash to on by
default and make omission opt-out instead.

- default (or -schemaHash): hash + version constants emitted, as before v0.27.0.
- -schemaHash=false: omits the hash from the header comment and the version
  constants (WebrpcVersion, WebrpcSchemaVersion, WebrpcSchemaHash). The
  "Code generated by ... DO NOT EDIT." line stays.

Regenerated _examples (hash restored).
@klaidliadon klaidliadon merged commit 97dc15e into master Jun 19, 2026
1 check passed
@klaidliadon klaidliadon deleted the fix/schema-hash-opt-out branch June 19, 2026 13:52
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