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

uProtocol Options Cleanup #141

Merged
merged 9 commits into from
May 22, 2024
Merged

uProtocol Options Cleanup #141

merged 9 commits into from
May 22, 2024

Conversation

stevenhartley
Copy link
Contributor

@stevenhartley stevenhartley commented May 14, 2024

This change addresses the following:

  • Move v1 protos to a v1 folder to mirror what we had in the past and to stay with the convention that the package name and folders are the same
  • Rename the options file to remove uprotocol as it is redundant
  • Add in SOME/IP code generator metadata so that SOME/IP serializable structures can be generated from the proto messages using specific extensions
  • Cleaning up the names of the options to follow a standard
  • Cleanup of UServiceTopic that is used by the code generators to build static UUris for uEs to subscribe to said topics

#140

@stevenhartley stevenhartley added documentation Improvements or additions to documentation enhancement New feature or request v1.5.8 labels May 14, 2024
The following change addresses a number of concerns with the uprotocol_options.proto that is used to declare protocol specific metadata.
@stevenhartley stevenhartley marked this pull request as ready for review May 16, 2024 19:58
basics/permissions.adoc Outdated Show resolved Hide resolved

// Code Access Permission (CAP) Level for said topic
uint32 permission_level = 4;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing EOL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thank you

up-l3/udiscovery/v3/README.adoc Outdated Show resolved Hide resolved
stevenhartley and others added 3 commits May 17, 2024 08:46
Co-authored-by: Kai Hudalla <kai.hudalla@bosch.com>
Co-authored-by: Kai Hudalla <kai.hudalla@bosch.com>
@stevenhartley
Copy link
Contributor Author

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.

Copy link
Contributor

@sophokles73 sophokles73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevenhartley stevenhartley merged commit a19bdc2 into main May 22, 2024
2 checks passed
gregmedd added a commit to gregmedd/up-conan-recipes that referenced this pull request May 23, 2024
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.
gregmedd added a commit to gregmedd/up-spec that referenced this pull request May 23, 2024
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.
gregmedd added a commit to gregmedd/up-spec that referenced this pull request May 23, 2024
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.
gregmedd added a commit to gregmedd/up-spec that referenced this pull request May 23, 2024
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.
gregmedd added a commit to gregmedd/up-conan-recipes that referenced this pull request May 24, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants