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

Miscellaneous scrapping fixes #378

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gergondet-woven
Copy link

@gergondet-woven gergondet-woven commented Feb 4, 2025

Hello drake-ros maintainers,

Thank you for making this project available. We have been using it to build our software for the past months and we have built up a number of patches that we hope can be useful to everyone.

This PR is the first I'm opening and it contains 4 small patches related to various edge cases in the workspace scrapping that we have encountered.

Below is a short summary of the individual patches, I am happy to submit separate PRs if you prefer.

P1: Remove elements that have a condition attribute on ROS1

This is used by a number of packages that are trying to support both versions at the same time.

This patch is actually part of #336 we actually had our own patch that does pretty much the same thing (including packages that have the $ROS_VERSION == 2 condition instead of excluding the $ROS_VERSION == 1). However, that PR incorporates more changes this particular fix is not available on main yet so I hope it's ok to bring it in with this PR.

P2: Fix an issue with some Python packages that have multiple entries in the egg top_level.txt (seen in `launch_testing for example)

P3: Fix an issue with CMake's JSON where libraries' paths are escaped under some conditions (for example if the workspace path has a ~ character)

P4: Include *.inc files in C++ headers of library, afaik, only the domain_bridge package uses this extension

Thanks again for making bazel_ros2_rules and I'm looking forward to your feedback.


This change is Reviewable

Some Python packages (e.g. launch_testing) have multiple entries in
top_level.txt, with this commit they should be hanlded correctly.
When the workspace path has ~ characters (and possibly others), the JSON
output by CMake will be a quoted string, e.g.

```
"lib": "\"/some/ws~~path/libfoo.so\""
```

The extract path will be `"/some/ws~~path/libfoo.so"` instead of
`/some/ws~~path/libfoo.so` and the former will not be treated as path
down the line.
This is used in the domain_bridge package.
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.

1 participant