Skip to content
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

Simplify union codegen #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frankgrimes97
Copy link

Don't generate union classes when a simple union contains only
two elements, one of which is null.
Instead, generate pointers to the types. (Golang built-in nullability)

#184

Don't generate union classes when a simple union contains only
two elements, one of which is null.
Instead, generate pointers to the types. (Golang built-in nullability)

actgardner#184
@frankgrimes97
Copy link
Author

@actgardner Here is my first attempt at addressing the issue... any feedback is most welcome!

Hopefully this is a good first step towards a releasable feature/improvement.

N.B. In order to preserve the GenericRecord behaviour and keep its tests from failing I did need to add a genericMode irProgram option

@tomasfabian
Copy link

Hi @actgardner @frankgrimes97,
this would be a great feature. Shall be this PR merged into master and released soon, please?

Initially I stumbled on this related but closed issue #40.

Thank you! Regards Tomas.

@dsincl002c
Copy link

Hi @actgardner, any update on this PR? As Tomas stated, this would be highly beneficial.

Thanks!

@anekdoti
Copy link

anekdoti commented Nov 4, 2022

Hello @actgardner, I also would find this a great improvement to the code generation.

@nayanbhana
Copy link

Hi @actgardner, is this feature a possibility in the future?

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.

5 participants