-
Notifications
You must be signed in to change notification settings - Fork 31
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
Python #119
base: master
Are you sure you want to change the base?
Python #119
Conversation
Without package defined in all .proto files, output generation fails, e.g. joshua@cryptodevs[proto] protoc -I src --cpp_out=cpp src/*.proto blockchain_block_v1.proto:20:12: "blockchain_txn" is not defined. blockchain_block.proto: Import "blockchain_block_v1.proto" was not found or had errors. blockchain_block.proto:6:17: "blockchain_block_v1" is not defined. - With package defined, resolve conflict between enum and package namespace radio.proto:3:9: "helium.radio" is already defined (as something other than a package) in file "blockchain_txn_poc_receipts_v1.proto". - In src/service/gateway.proto, resolve warning on unused import
@@ -2,8 +2,8 @@ syntax = "proto3"; | |||
package helium; | |||
|
|||
enum origin { | |||
p2p = 0; | |||
radio = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don’t rename fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done due to the following error:
radio.proto:3:9: "helium.radio" is already defined (as something other than a package) in file "blockchain_txn_poc_receipts_v1.proto".
This appears to be an issue with protobuf namespacing, I'm not sure why things that aren't protoc
didn't care and I made this change based on a recommendation in an SO answer from one of protobuf's original authors about how to handle these conflicts. If there is an alternate method that wouldn't break the naming that'd be preferable, but I am unaware of what that would be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that it'll break existing erlang and rust users of this message. Perhaps we're missing a protoc option here since Prost (rust) uses protoc under the hood and does not appear to have this issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to dig into those a little bit more to compare, thanks for the tip.
@thecardcheat Are you still interested in this PR? if so we need to get that comment addressed. If not, can this PER get closed? |
I would be very interested in a working python version, as compiling the project threw the same errors on me on trying to run it (also a given i am very green with grpc atm). However with Openlns now a thing it will let me integrate backend changes to route ids directly through python instead of another language i do not know. |
Commit message has details of protobuf changes. I am unsure of the consequence for existing clients but the name change to avoid the namespace conflict seems breaking.