-
Notifications
You must be signed in to change notification settings - Fork 49
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
Change message generation workflow #256
Conversation
Codecov Report
@@ Coverage Diff @@
## main #256 +/- ##
===========================================
+ Coverage 14.53% 85.44% +70.91%
===========================================
Files 200 10 -190
Lines 12505 962 -11543
===========================================
- Hits 1817 822 -995
+ Misses 10688 140 -10548
Continue to review full report at Codecov.
|
Signed-off-by: Michael Carroll <[email protected]>
ab98e9f
to
8853436
Compare
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
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 approach looks cleaner to me. Good catch removing the headers.
I think we need to do two small changes in test/Factory_TEST.cc
and test/ign_TEST.cc
and replace the #include "gz/msgs/test_config.h
with #include "test_config.h
. Otherwise we'd need to make other Ignition<->gz changes in the project if I'm not wrong as test_config
is installed under ignition
and not gz
.
👨🌾 Quick question, is this meant (or could be) to be backported to Citadel? @mjcarroll |
I targeted Garden out of maximal ease. I would be willing to put in the effort for Fortress/Citadel, but I don't have a good feeling of if this violates ABI/API? The biggest divergence is that we are introducing an entirely new folder of headers that have the original protobuf generated code and replacing our previously-generated headers with smaller versions. What do you think @chapulina ? |
Signed-off-by: Michael Carroll <[email protected]>
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.
@Blast545 and I reviewed this on a call together. We spent most of the time talking through the added python script with a few notes there and then reviewing the script's usage in CMake above.
I left a few comments in line. As a Gazebo / protobuf novice, I don't quite follow the plumbline from the detail file, to the replacement protobuf header, to the ignition/gazebo header. I think that could be clearer, either as commentary or function decomposition in the python script or as PR commentary.
We (@Blast545 and I) originally scheduled time to look at this before the discussion in yesterday's simulation meeting to review it for ABI/API compatibility. Since this is, at the end of the day, shuffling header files around but ultimately seems to maintain the overall translation unit structure of the headers. It does not appear to be an ABI/API break but is a project organization and structure break. It also adds a build-time dependency on a python3 interpreter which may or may not be a new build time dependency and therefore a "breaking change" in that regard. In short, I couldn't say definitively whether or not this is backportable. There seem to be a lot of "maybe not"s but nothing damning. |
In further discussion with @Blast545 we talk about the fact that the script which is currently in Python could be written in pure CMake if needed. But the Python3 script will likely be easier to evolve over time. So if introducing the python3 interpreter dependency is the deal breaker, then the logic could be ported over to CMake at the cost of some humanity. |
I'll improve the documentation on this. There are some gymnastics going on that were much, much easier to write in python due to the limitations of the protobuf generator API as well as CMake, in general. |
Yeah, I was not necessarily advocating that this should be rewritten in CMake, just noting the possibility since the primary activity seems to be filename / pathname transformations after executing protoc. If this was meant to be a one-and-done thing where we write it once and then don't expect to iterate or evolve it that would strengthen my desire to see it done in CMake once it was settled to drop the build-time python3 dependency but we'd want to be extremely confident that this wouldn't evolve as it will be much easier to work on in Python. |
Signed-off-by: Michael Carroll <[email protected]>
I anticipate that this will likely evolve, potentially in light of discussions around data representations here: gazebosim/gz-sim#494 |
This is ready for review. |
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
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.
In general review ignition
or ign
to gz
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
This reverts commit f1188f7. Signed-off-by: Michael Carroll <[email protected]>
8b3f90d
to
73fa8c4
Compare
Signed-off-by: Michael Carroll <[email protected]>
We were expecting this PR to remove the warnings generated by protobuf all over the stack, right? I ran a job on gz-transport to check and the warnings are still there: Just checking, maybe an extra release of gz-msgs is required? |
FYI: @Crola1702 |
That was the expectation, and it looks like that built against the newest version. I will take a look, maybe something is misconfigured. |
This changes the way that we generate headers a bit.
Rather than injecting code directly into the protobuf headers, this instead causes the protobuf headers to be generated in
ignition/msgs/detail/msg.pb.h
.We then generate our own
ignition/msgs/msg.pb.h
header with whatever content we want that completely wraps the protobuf header.Example of a new header: