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

Emit embedded or inlined structs in Go to correspond with struct unifications in schemas #149

Open
sdboyer opened this issue May 11, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sdboyer
Copy link
Contributor

sdboyer commented May 11, 2023

The Go code generator does not currently handle struct unifications correctly. Rather than either inlining or embedding the type, it simply omits it entirely.

The initial fix here should should embed the type, without any option for inlining. If a use case presents itself, we can add a separate config option to enable inlining later.

This case is covered by the testdata/lineage/unifyref.txtar, and will impact (among probably many others) the Azure Monitor plugin in grafana

@sdboyer sdboyer added the bug Something isn't working label May 11, 2023
@joanlopez
Copy link
Contributor

Assigning it to @spinillos cause she already started some work 🎉 ➡️ #154

@joanlopez joanlopez removed their assignment May 18, 2023
@joanlopez
Copy link
Contributor

Hey @spinillos, @sdboyer,
I see the aforementioned PR has been merged, and indeed the lineage/unifyref case was removed from the ToDo list there. So, can we close this issue? Or is there any other work still remaining?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants