Generate messages in downstream builds#339
Conversation
8eca9ee to
9e55508
Compare
79041c4 to
3a66601
Compare
|
Just checking, we can't compile the whole |
|
Could you help me a bit with the expectations after this PR? What can I do and what can't I do yet (if any)? |
|
Does this PR require https://github.com/gazebosim/gz-cmake/pull/345/files? |
Correct, I am working on the corresponding downstream modifications.
I still owe some documentation here. The general expectation is that We should expect that with this PR, you should be able to add messages to your project, as demonstrated in this example: https://github.com/mjcarroll/mjcarroll-custom-msgs This will also provide users a way to define custom messages downstream with simple cmake macros.
Correct, it was just merged, and I'm going to cut a release shortly. |
|
@osrf-jenkins retest this please |
caguero
left a comment
There was a problem hiding this comment.
I'm compiling Harmonic with the understanding that it won't successfully compile all libraries. After running colcon I see generated .pb.h files under ./build/gz-msgs10/gz_msgs_gen/gz/msgs. Is that expected?
|
I also see these two warning messages: |
Yes, this is correct. They are being generated to run the tests. |
|
@caguero I have opened PRs for all downstream libraries and added examples/READMEs. |
iche033
left a comment
There was a problem hiding this comment.
Update Migradtion.md guide?
Codecov Report
@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 95.43% 96.89% +1.46%
==========================================
Files 10 28 +18
Lines 1030 1064 +34
==========================================
+ Hits 983 1031 +48
+ Misses 47 33 -14
|
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> Signed-off-by: Michael Carroll <carroll.michael@gmail.com> Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
d299cbb to
a775cb5
Compare
|
Okay, all feedback addressed and rebased to get DCO happy. I think we are good here, and then a prerelease? |
| include(${@PROJECT_NAME@_DIR}/gz_msgs_generate.cmake) | ||
| include(${@PROJECT_NAME@_DIR}/target_link_messages.cmake) | ||
|
|
||
| set(@PROJECT_NAME@_INSTALL_PATH "${@PROJECT_NAME@_DIR}/../../..") |
There was a problem hiding this comment.
given the other issues I've been seeing with the /usr/lib/<arch> folder in gazebo-release/gz-msgs10-release#3 and gazebosim/gz-cmake#360, I'm a bit suspicious that this hard-coded ../../.. is wrong
This reverts commit 0c78b96. Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
* Revert "Use cmake extras path variables (#359)" This reverts commit 786b42a. Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai> * Revert "Unconditionally find the python interpreter (#356)" This reverts commit 16de9ef. Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai> * Revert "Generate messages in downstream builds (#339)" This reverts commit 0c78b96. Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai> --------- Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
🎉 New feature
Expose message generation functionality to downstream packages and remove message generation from the
msgspackage.Summary
Background
Up until now, we have:
protofiles - each describing a gz-msgs message.ccand.hhfiles in thegz-msgspackagegz-msgslibrary that is also distributed in the binary package.The issue with this approach is that it means that each change to a proto message will cause the ABI to break, which is inconvenient. We have multiple issues addressing this in
New Approach
This new approach will now distribute the proto files, but will no longer distribute a binary library that downstream users will link against. Instead, downstream users can generate the messages that they need themselves or add new message definitions in their own packages.
A summary of the changes required to make this happen:
corelibrary that has the gz-msgs functionality minus the generated code.compiledlibrary that maintains the CLI functionality.conversionsa header-only operation, so that the core library doesn't need to depend on the generated messages.Downstream changes required:
Checklist
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.