-
Notifications
You must be signed in to change notification settings - Fork 21
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
uProtocol Options Cleanup #141
Conversation
The following change addresses a number of concerns with the uprotocol_options.proto that is used to declare protocol specific metadata.
da4b6bf
to
9a34cb7
Compare
|
||
// Code Access Permission (CAP) Level for said topic | ||
uint32 permission_level = 4; | ||
} |
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.
missing EOL
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.
done, thank you
Co-authored-by: Kai Hudalla <kai.hudalla@bosch.com>
Co-authored-by: Kai Hudalla <kai.hudalla@bosch.com>
changes have been reviewed by others internal to GM who are not setup with github. Please let me know @sophokles73 if you are OK that I merge the changes or you would like anything else updated. |
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.
LGTM
The up-spec repo moved the core API proto files into a new v1 folder as part of eclipse-uprotocol/up-spec#141. With that change, we are no longer required to make our own v1 folder.
The protobuf compiler uses the concept of a "canonical" path when generating source files. This is the base point where it searches for import files. It _expects_ that path will match the base path for searching for headers, too. The end result is that import "v1/ustatus.proto" will generate a C++ header that contains #include "v1/ustatus.pb.h" while we have been explicitly asked to use includes starting with `uprotocol` in up-cpp: #include "uprotocol/v1/ustatus.pb.h" We were able to work around this with some tricks when the import paths were file names only (e.g. `import ustatus.proto`). However, the proto files have moved under the `v1/` directory as of eclipse-uprotocol#141. Based on my reading of the protoc documentation and several stack overflow postings, it seems the intended way for .proto files to be written in this scenario is to import the full canonical path as intended for the output files: import "uprotocol/v1/ustatus.proto" so that protoc can generate the correct paths in output sources in the first place.
The protobuf compiler uses the concept of a "canonical" path when generating source files. This is the base point where it searches for import files. It _expects_ that path will match the base path for searching for headers, too. The end result is that import "v1/ustatus.proto" will generate a C++ header that contains #include "v1/ustatus.pb.h" while we have been explicitly asked to use includes starting with `uprotocol` in up-cpp: #include "uprotocol/v1/ustatus.pb.h" We were able to work around this with some tricks when the import paths were file names only (e.g. `import ustatus.proto`). However, the proto files have moved under the `v1/` directory as of eclipse-uprotocol#141. Based on my reading of the protoc documentation and several stack overflow postings, it seems the intended way for .proto files to be written in this scenario is to import the full canonical path as intended for the output files: import "uprotocol/v1/ustatus.proto" so that protoc can generate the correct paths in output sources in the first place.
The protobuf compiler uses the concept of a "canonical" path when generating source files. This is the base point where it searches for import files. It _expects_ that path will match the base path for searching for headers, too. The end result is that import "v1/ustatus.proto" will generate a C++ header that contains #include "v1/ustatus.pb.h" while we have been explicitly asked to use includes starting with `uprotocol` in up-cpp: #include "uprotocol/v1/ustatus.pb.h" We were able to work around this with some tricks when the import paths were file names only (e.g. `import ustatus.proto`). However, the proto files have moved under the `v1/` directory as of eclipse-uprotocol#141. Based on my reading of the protoc documentation and several stack overflow postings, it seems the intended way for .proto files to be written in this scenario is to import the full canonical path as intended for the output files: import "uprotocol/v1/ustatus.proto" so that protoc can generate the correct paths in output sources in the first place.
With eclipse-uprotocol/up-spec#161 and eclipse-uprotocol/up-spec#141, we can now build the up-core-api protobuf library using the standard process for cmake+protobuf. This will result in generated headers and sources correctly referencing the `uprotocol/v1/` include tree.
This change addresses the following:
#140