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

Enable support for python3 & proto3 #129

Open
manuks88 opened this issue Jul 8, 2022 · 2 comments
Open

Enable support for python3 & proto3 #129

manuks88 opened this issue Jul 8, 2022 · 2 comments

Comments

@manuks88
Copy link

manuks88 commented Jul 8, 2022

Hi team, warp17 doesn't compile with python3 & proto2/proto3. Please enable support for it.

make[1]: Entering directory '/home/localadmin/warp17/warp17-1.8/api'
PC-C warp17-app-http.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:562] No syntax specified for the proto file: warp17-app-http.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
PC-PY warp17-app-http.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:562] No syntax specified for the proto file: warp17-app-http.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
PC-XLATE warp17-app-http.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:562] No syntax specified for the proto file: warp17-app-http.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
Traceback (most recent call last):
File "./xlate-gen/warp17_xlate_gen.py", line 912, in <module>
data = sys.stdin.read()
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 34: invalid start byte
--custom_out: protoc-gen-custom: Plugin failed with status code 1.
make[1]: *** [Makefile.api:124: generated/c/warp17-app-http.pb-c.h] Error 1
make[1]: Leaving directory '/home/localadmin/warp17/warp17-1.8/api'
make: *** [Makefile:72: all] Error 2

Adding "syntax = proto2"

make[1]: Entering directory '/home/localadmin/warp17/warp17-1.8/api'
PC-C warp17-app-http.proto
PC-PY warp17-app-http.proto
PC-XLATE warp17-app-http.proto
Traceback (most recent call last):
File "./xlate-gen/warp17_xlate_gen.py", line 912, in <module>
data = sys.stdin.read()
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 34: invalid start byte
--custom_out: protoc-gen-custom: Plugin failed with status code 1.
make[1]: *** [Makefile.api:124: generated/c/warp17-app-http.pb-c.h] Error 1
make[1]: Leaving directory '/home/localadmin/warp17/warp17-1.8/api'
make: *** [Makefile:72: all] Error 2

Adding "syntax = proto3"

make[1]: Entering directory '/home/localadmin/warp17/warp17-1.8/api'
PC-C warp17-app-http.proto
warp17-app-http.proto:84:14: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
warp17-app-http.proto:90:14: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
make[1]: *** [Makefile.api:120: generated/c/warp17-app-http.pb-c.h] Error 1
make[1]: Leaving directory '/home/localadmin/warp17/warp17-1.8/api'
make: *** [Makefile:72: all] Error 2

I tried commenting out "optional" but that also failed to compile with a different set of errors.

@davvore33
Copy link
Collaborator

Hi, yes unluckily there's no straight way to support proto3, this project is now orphan the facto so unless some developer will actually fix this no proto3/python3 support will come

@manuks88
Copy link
Author

Thanks @davvore33. For now the src code from git repo works with py3. So no need to download it from release.

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

2 participants