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

Add initial BuildStream backend #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juergbi
Copy link

@juergbi juergbi commented Mar 8, 2024

This adds a generator for BuildStream elements. https://github.com/CodethinkLabs/ros2-bst is a working BuildStream project for a subset of ROS Iron where all elements for ROS packages have been generated by this branch of superflore. It also includes manually written elements for some external dependencies and depends on freedesktop-sdk for the base system and other external dependencies.

It currently cannot generate elements for all packages of a ROS distro as some packages require additional external dependencies. It's thus necessary to invoke superflore-gen-bst with the --only option to specify the target packages. Elements are also generated for internal dependencies of target packages.

The generated elements currently do not include test dependencies and test suites of packages are not run as part of the build process. This should be added as a future enhancement.

The generated elements do not yet include test dependencies and test
suites of packages are not run as part of the build process.
@robwoolley
Copy link
Contributor

Thanks for this contribution. Sorry for the delay. I am just ramping up as the new maintainer.

I tested your modifications with the following steps:

git clone https://github.com/CodethinkLabs/ros2-bst
git clone https://gitlab.com/freedesktop-sdk/freedesktop-sdk
superflore-gen-bst --ros-distro iron --output-repository-path ros2-bst --dry-run --only rclcpp

And got the error:

>>>> Regenerating package 'rti_connext_dds_cmake_module'...
Traceback (most recent call last):
  File "/home/rosuser/superflore/venv/bin/superflore-gen-bst", line 33, in <module>
    sys.exit(load_entry_point('superflore==0.3.3+14.ga343862', 'console_scripts', 'superflore-gen-bst')())
  File "/home/rosuser/superflore/venv/lib/python3.10/site-packages/superflore-0.3.3+14.ga343862-py3.10.egg/superflore/generators/buildstream/run.py", line 160, in main
  File "/home/rosuser/superflore/venv/lib/python3.10/site-packages/superflore-0.3.3+14.ga343862-py3.10.egg/superflore/generators/buildstream/gen_packages.py", line 109, in regenerate_pkg
  File "/home/rosuser/superflore/venv/lib/python3.10/site-packages/superflore-0.3.3+14.ga343862-py3.10.egg/superflore/generators/buildstream/gen_packages.py", line 215, in element_text
  File "/home/rosuser/superflore/venv/lib/python3.10/site-packages/superflore-0.3.3+14.ga343862-py3.10.egg/superflore/generators/buildstream/bst_element.py", line 261, in get_element_text
  File "/home/rosuser/superflore/venv/lib/python3.10/site-packages/superflore-0.3.3+14.ga343862-py3.10.egg/superflore/generators/buildstream/bst_element.py", line 222, in get_dependencies
superflore.exceptions.UnresolvedDependency: external dependency rti-connext-dds-6.0.1 missing

Can you provide any guidance on what is supported?

Cheers,
Rob

@juergbi
Copy link
Author

juergbi commented Nov 29, 2024

rti-connext-dds-6.0.1 is an external dependency that is not currently included in the ros2-bst repository. You can pass --skip-keys rmw_connextdds to disable rmw_connextdds and with that, avoid the missing external dependency. With this option, your command completes successfully here.

External dependencies can be added to ros2-bst as needed without requiring changes in superflore.

@robwoolley
Copy link
Contributor

robwoolley commented Nov 30, 2024

Thanks for the quick reply. Running the following completed successfully:

superflore-gen-bst --ros-distro iron --output-repository-path ros2-bst --dry-run --only rclcpp --skip-keys rmw_connextdds

which updated the following files:

ros2-bst/elements/generated/ament-cmake/ament-cmake-core.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-definitions.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-dependencies.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-include-directories.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-interfaces.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-libraries.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-link-flags.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-export-targets.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-gen-version-h.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-gmock.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-gtest.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-include-directories.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-libraries.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-pytest.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-python.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-target-dependencies.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-test.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake-version.bst
ros2-bst/elements/generated/ament-cmake/ament-cmake.bst
ros2-bst/elements/generated/cyclonedds/cyclonedds.bst
ros2-bst/elements/generated/fastrtps/fastrtps.bst
ros2-bst/elements/generated/libstatistics-collector/libstatistics-collector.bst
ros2-bst/elements/generated/rcl/rcl-yaml-param-parser.bst
ros2-bst/elements/generated/rcl/rcl.bst
ros2-bst/elements/generated/rclcpp/rclcpp.bst
ros2-bst/elements/generated/rcpputils/rcpputils.bst
ros2-bst/elements/generated/rcutils/rcutils.bst
ros2-bst/elements/generated/rmw-fastrtps/rmw-fastrtps-cpp.bst
ros2-bst/elements/generated/rmw-fastrtps/rmw-fastrtps-dynamic-cpp.bst
ros2-bst/elements/generated/rmw-fastrtps/rmw-fastrtps-shared-cpp.bst
ros2-bst/elements/generated/rmw-implementation/rmw-implementation.bst
ros2-bst/elements/generated/ros2-tracing/tracetools.bst

@robwoolley
Copy link
Contributor

What are the future plans for the BuildStream backend?

Will you or CodeThink be maintaining it going forward?

Since ROS 2 Iron is now end-of-life, will you be adding support for Humble, Jazzy, or Rolling?

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