Skip to content

Erlang generator improvements for enum and type #3122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

kpy3
Copy link
Contributor

@kpy3 kpy3 commented Apr 16, 2025

Another bunch of Erlang generator improvements. This time changes in type and enum generation with some minor typos.

Changes:

  • Mark exception declaration with 'exception' in commentary
  • Mark enum declaration with 'enum' in commentary
  • Generate type for typedef declaration, use generated type instead of base type in declaration
  • Generate type for enum values, type consist of declared values. Use constant names in type declaration
  • Avoid integer type as enum value type, use generated type instead
  • Avoid magic numbers for enum as default values, use enum's constant name instead
  • Introduce nominal types (Erlang 28+)
  • Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

kpy3 added 7 commits April 14, 2025 20:10
Notable changes:
  * Added comment for every enum
  * Introduce type for enum
  * Restrict enum type values to defined by user instead of just by type
Remove type erasure from type definition and strictly follow type definitions.
@kpy3 kpy3 marked this pull request as draft April 16, 2025 06:56
@Jens-G Jens-G added the erlang label Apr 18, 2025
@kpy3 kpy3 marked this pull request as ready for review May 19, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants