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
Doubly-nested types generate invalid C# code #307
Labels
Comments
jskeet
added a commit
to jskeet/protobuf
that referenced
this issue
May 15, 2015
We still have some protos which aren't generated how we want them to be: - Until we have an option to specify the "umbrella" class, DescriptorProtoFile will be broken. (The change of name here affects the reflection descriptor, which accounts for most of the change. That's easier than trying to work out exactly which occurrences of Descriptor need changing though.) - That change affects UnittestCustomOptions - Issue protocolbuffers#307 breaks Unittest.cs After this commit, we don't have the record of the fixups in the files themselves any more, but one centralized record in the shell script.
jskeet
added a commit
to jskeet/protobuf
that referenced
this issue
May 16, 2015
We still have some protos which aren't generated how we want them to be: - Until we have an option to specify the "umbrella" class, DescriptorProtoFile will be broken. (The change of name here affects the reflection descriptor, which accounts for most of the change. That's easier than trying to work out exactly which occurrences of Descriptor need changing though.) - That change affects UnittestCustomOptions - Issue protocolbuffers#307 breaks Unittest.cs After this commit, we don't have the record of the fixups in the files themselves any more, but one centralized record in the shell script.
ghost
mentioned this issue
Jun 1, 2015
Is this still an issue in the new codegen? |
Yes, it is. (Probably because I haven't touched any of the code that works out type names.) |
Looks like the problem is in csharp_helpers.cc, in
It may be as simple as changing "false" to "true". Will need to investigate. |
jskeet
added a commit
to jskeet/protobuf
that referenced
this issue
Jun 29, 2015
No specific test case - if the generated code compiles, the issue is fixed :)
jskeet
added a commit
that referenced
this issue
Jun 29, 2015
Fix for doubly-nested types - issue #307.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider a proto of:
The generated C# code contains:
This should be:
Note the extra
Types
betweenMiddle
andInner
.(This currently makes the generated code from unittest.proto fail to compile, so once that does compile, that's enough of a test for the fix...)
The text was updated successfully, but these errors were encountered: