Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Jun 13, 2023
1 parent cc773dd commit d8e07f2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions bazel_ros2_rules/ros2/rosidl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,18 @@ def rosidl_interfaces_group(
Additional keyword arguments are those common to all rules.
"""

# Workaround ros2/rosidl_typesupport#120
# The introspection type supports assume the library name is the same as
# the package name (aka "group" here). If the ROS workspace supports
# multiple typesupports then the introspection type support will fail
# to load.
# Workaround by making the library name the same as the group name, and
# make aliases for those targets.
real_name = name
if group != None:
name = group

rosidl_definitions_filegroup(
name = _make_public_name(name, "_defs"),
group = group or name,
Expand Down Expand Up @@ -1344,3 +1356,17 @@ def rosidl_interfaces_group(
py_library_rule = py_library_rule,
**kwargs
)

if real_name != name:
native.alias(
name = real_name + "_defs",
actual = name + "_defs",
)
native.alias(
name = real_name + "_cc",
actual = name + "_cc",
)
native.alias(
name = real_name + "_py",
actual = name + "_py",
)

0 comments on commit d8e07f2

Please sign in to comment.