Skip to content

Fix enum wire values#4

Merged
tolgahan-arikan merged 1 commit into
masterfrom
fix-enum-naming
Apr 17, 2026
Merged

Fix enum wire values#4
tolgahan-arikan merged 1 commit into
masterfrom
fix-enum-naming

Conversation

@tolgahan-arikan
Copy link
Copy Markdown
Collaborator

Summary

  • use explicit RIDL enum values for C string enum conversion helpers instead of enum identifiers
  • keep non-string enums using their existing identifier-based behavior
  • add regression coverage for explicit string enum round-tripping

Why

The C generator was emitting enum names like Ethereum and Native from *_to_string / *_from_string even when the schema defined explicit wire values like ethereum and native. That breaks JSON encoding and decoding for generated clients. The fix is scoped to string enums so numeric enum behavior stays unchanged.

Validation

  • go test ./...

@tolgahan-arikan tolgahan-arikan marked this pull request as ready for review April 17, 2026 11:26
@tolgahan-arikan tolgahan-arikan merged commit f6b17a3 into master Apr 17, 2026
2 checks passed
@tolgahan-arikan tolgahan-arikan deleted the fix-enum-naming branch April 17, 2026 11:28
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