s2client-proto icon indicating copy to clipboard operation
s2client-proto copied to clipboard

Update to proto3 syntax

Open matthid opened this issue 7 years ago • 3 comments

I understand if you are not ready for update yet. Just close or leave it open until you are.

But this was the only viable option to use the officially supported Protobuf package from Google compatible with most systems.

This was required as the protobuf code-generation for C# is only working with proto3 syntax (in the official package). See https://github.com/matthid/s2client-dotnet

matthid avatar Sep 11 '17 22:09 matthid

The ideal would be for the proto files to be compatible with both proto2 and proto3 compilers. Do you know if there is a way of doing that?

KevinCalderone avatar Sep 11 '17 22:09 KevinCalderone

@KevinCalderone To be honest I have no idea. But I'd image it is hard to keep binary compatibility if you are only allowed to use the union of both. (But I guess it is not possible anyway).

Another option would be to keep a proto2 branch and keep it up to date for a while. Like I said it's up to you on how you want to continue with this. I'm even fine with closing the PR as keeping my own fork of this is a lot easier than maintaining/forking/building my own proto2 compiler ;)

matthid avatar Sep 11 '17 22:09 matthid

We are stuck on proto2 internally, so it is unlikely we will want to drop support for that.

For now the easiest solution is to just keep your own modified copy of the proto files. I will have to do some research to see if it is possible to have a file that can support both. If it is working for you, then it must be binary compatible, so I assume there must be a way of doing it.

At the very least, we can try to maintain our files to make it trivial to covert to proto3. If you want to modify your PL to just add the 0 entries to all the enums, I'll accept that request. (Maybe make DebugTestProcess::Test::TEST_UNSET to be consistent)

KevinCalderone avatar Sep 11 '17 23:09 KevinCalderone