Skip to content

Conversation

@lsk567
Copy link
Contributor

@lsk567 lsk567 commented Jan 20, 2026

Summary

  • The package.xml had two <package> root elements which is invalid XML
  • This caused colcon to fail to parse it, preventing ROS2 builds from finding the reactor-cpp package

Test plan

  • Verified ROS2 C++ tests pass with this fix (tested locally in Docker with ros:jazzy-ros-base)

🤖 Generated with Claude Code

The package.xml had two <package> root elements which is invalid XML.
This caused colcon to fail to parse it, preventing ROS2 builds from
finding the reactor-cpp package.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lsk567 added a commit to lf-lang/lingua-franca that referenced this pull request Jan 20, 2026
Points to lf-lang/reactor-cpp#80 which fixes the malformed package.xml
that was causing ROS2 colcon builds to fail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lsk567 and others added 12 commits January 20, 2026 15:08
Detect ament during ROS2 builds and export targets so reactor-cpp is discoverable by ament_target_dependencies.
Use a standard target export name so ament generates reactor-cppConfig.cmake for downstream find_package calls.
When using ament, ament_package() should handle installing the export
files and generating the Config.cmake. The explicit install(EXPORT ...)
was interfering with this, causing find_package(reactor-cpp) to fail
in downstream packages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The ament_package() generated Config.cmake includes the export targets
file, so we need to install it. The previous fix incorrectly removed
this when using ament.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Match the pattern used by rclcpp and other ROS2 packages:
- Use PROJECT_NAME as export name instead of PROJECT_NAME + Targets
- Add ament_export_libraries for legacy CMake compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clean up debug output that was added during ROS2/ament build troubleshooting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lsk567 lsk567 closed this Jan 21, 2026
@lsk567 lsk567 deleted the fix-malformed-package-xml branch January 21, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants