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

Forward usage of nested enums generates ruby files that can't be loaded #48

Open
sergiocampama opened this issue Mar 19, 2018 · 1 comment

Comments

@sergiocampama
Copy link

Repro: https://github.com/sergiocampama/ruby_proto_repro, just run generate_proto.sh from inside the repo.

What happens is that the MessageB gets added to the forward declaration, but its internal enums are not, so the subsequent usage of the enum type fails to be resolved.

One way to fix this particular would be to forward declare all enums, even nested ones, before messages. Then forward declare the messages and finally then extend the messages with any fields that they have defined.

@sergiocampama
Copy link
Author

Forward declare of enums => actual definitions

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

No branches or pull requests

1 participant