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
|
|
||
| enum origin { | ||
| p2p = 0; | ||
| radio = 1; |
There was a problem hiding this comment.
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.
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.
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.