Skip to content

[kilted] Update deprecated call to ament_target_dependencies #396

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

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

Conversation

DLu
Copy link

@DLu DLu commented May 8, 2025

As of the ROS 2 Kilted release ament_target_dependencies is deprecated.

This PR updates the syntax. Caution should be used to ensure that the target branch is not used for other ROS 2 distros.

Note: This PR was generated by a bot script, but using the simple pattern matching of the ros_glint library. No LLMs were used.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @DLu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request addresses the deprecation of ament_target_dependencies in the ROS 2 Kilted release. I've updated the CMakeLists.txt file in the dynamixel_workbench_toolbox package to use target_link_libraries instead. This change ensures compatibility with ROS 2 Kilted and future versions, while maintaining functionality. The PR description notes that this change was generated by a bot script using pattern matching, without the use of LLMs.

Highlights

  • API Update: The deprecated function ament_target_dependencies is replaced with target_link_libraries.
  • Compatibility: This change ensures compatibility with ROS 2 Kilted and later releases.

Changelog

  • dynamixel_workbench_toolbox/CMakeLists.txt
    • Replaced ament_target_dependencies(${LIB_NAME} ${dependencies_lib}) with target_link_libraries(${LIB_NAME} PUBLIC ${dependencies_lib}) on line 52.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A deprecated call,
Replaced before the fall,
New syntax takes hold,
As the old is now old,
Kilted's future stands tall.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request updates a deprecated call ament_target_dependencies to target_link_libraries in the CMakeLists.txt file. This change is necessary for compatibility with ROS 2 Kilted and later distributions. The PR was generated by a bot script using pattern matching, without LLMs.

Merge Readiness

The pull request updates a deprecated function call, which is necessary for compatibility with ROS 2 Kilted and later. Given the simple nature of the change and the fact that it was bot-generated, it seems reasonable to merge after addressing the comments. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.

@@ -49,7 +49,7 @@ add_library(${LIB_NAME} SHARED
src/${PROJECT_NAME}/dynamixel_tool.cpp
src/${PROJECT_NAME}/dynamixel_workbench.cpp
)
ament_target_dependencies(${LIB_NAME} ${dependencies_lib})
target_link_libraries(${LIB_NAME} PUBLIC ${dependencies_lib})

Choose a reason for hiding this comment

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

medium

Consider adding a comment explaining why this change was made, referencing the ROS 2 Kilted release notes. This will help future developers understand the context of the change.

target_link_libraries(${LIB_NAME} PUBLIC ${dependencies_lib}) # Updated for ROS 2 Kilted: ament_target_dependencies is deprecated

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