Skip to content

make sure that plugin arg includes the double colon.#2878

Merged
ahcorde merged 1 commit intorollingfrom
fujitatomoya/add-check-rclcpp_components_register_node
Jun 25, 2025
Merged

make sure that plugin arg includes the double colon.#2878
ahcorde merged 1 commit intorollingfrom
fujitatomoya/add-check-rclcpp_components_register_node

Conversation

@fujitatomoya
Copy link
Copy Markdown
Collaborator

Description

Fixes ros2/ros2_documentation#5745

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Comment on lines +60 to +62
if("${ARGS_PLUGIN}" MATCHES "^[^:]+:[^:]+$")
message(FATAL_ERROR "PLUGIN argument '${ARGS_PLUGIN}' appears to be incorrect. (e.g., 'package_name::ClassName').")
endif()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can detect the missing colon in the plugin argument as reported on ros2/ros2_documentation#5745.
I am still not sure if this is appropriate approach, but it actually checks the missing colon at build time.

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run action_tutorials_cpp fibonacci_action_server
^C[INFO] [1750790862.411470713] [rclcpp]: signal_handler(signum=2)
[ros2run]: Received signal:  Interrupt
[INFO] [1750790862.411682265] [rclcpp]: signal_handler(signum=2)
root@tomoyafujita:~/ros2_ws/colcon_ws# colcon build --packages-select action_tutorials_cpp rclcpp
[1.236s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
        'rclcpp' is in: /root/ros2_ws/colcon_ws/install/rclcpp
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
        --allow-overriding rclcpp

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> rclcpp
Finished <<< rclcpp [1.11s]
Starting >>> action_tutorials_cpp
--- stderr: action_tutorials_cpp
CMake Error at /root/ros2_ws/colcon_ws/install/rclcpp_components/share/rclcpp_components/cmake/rclcpp_components_register_node.cmake:61 (message):
  PLUGIN argument 'action_tutorials_cpp:FibonacciActionClient' appears to be
  incorrect.  (e.g., 'package_name::ClassName').
Call Stack (most recent call first):
  CMakeLists.txt:29 (rclcpp_components_register_node)

@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Jun 25, 2025

Pulls: #2878
Gist: https://gist.githubusercontent.com/ahcorde/a6f145a59b17d2848b794f9e87424e4e/raw/81aae14943a934cf673985afe68f9068beccd831/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/16306

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Copy Markdown
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The windows failures looks unrelated, do you mind to take a look @fujitatomoya ?

@ahcorde ahcorde merged commit 3cc2a0e into rolling Jun 25, 2025
3 checks passed
@ahcorde ahcorde deleted the fujitatomoya/add-check-rclcpp_components_register_node branch June 25, 2025 20:05
mihirr-NV pushed a commit to mihirr-NV/rclcpp that referenced this pull request Jun 26, 2025
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
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.

No error prompt for namespace typo in plugin declaration

3 participants