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

Using services keyword as field name causes bugged ProtoGen output #100

Open
GoogleCodeExporter opened this issue Apr 22, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Using the 'services' keyword as a field name causes ProtoGen to generate 
bugged C# code.
2. Reproducible using the attached protobuf definitions file (test.proto)
3. Also attached are the .protobin file generated using Google's protoc 
compiler and the resulting C# code produced by ProtoGen.

What is the expected output? What do you see instead?
Expect the C# code generated by ProtoGen to compile correctly. Instead, get the 
following error:
Test.cs(94,50): error CS0103: The name `ServicesList' does not exist in the 
current context

What version of the product are you using? On what operating system?
Ubuntu Linux, ProtoGen version 2.4.1.521, protoc 3.0.0-alpha-1, Mono C# compiler

Please provide any additional information below.
Manually renaming the ServicesList variable in the generated C# code to 
Service_List fixes the problem.

Original issue reported on code.google.com by alexjcol...@gmail.com on 16 Apr 2015 at 10:31

Attachments:

@GoogleCodeExporter
Copy link
Author

Please note that this project will be going away (I need to update the wiki).
See https://github.com/jskeet/protobuf-csharp-port which is a clone of the code 
here, but new code will be in the main Google protobuf repo.

Original comment by jonsk...@google.com on 16 Apr 2015 at 10:34

@GoogleCodeExporter
Copy link
Author

Ah cool - thanks for the heads up!

Original comment by alexjcol...@gmail.com on 16 Apr 2015 at 10:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant