Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented May 12, 2025

This patch adds support for type description generation in rosidl_cli. It introduces a new hash command to generate type descriptions. It also ensures they are always present as part of the generate command even if the user doesn't provide them.

Addresses #808

Recommended Review Order

I recommend starting with the new hash generator in rosidl_cli/rosidl_cli/command/hash, which utilizes the extension defined in rosidl_generator_type_description/rosidl_generator_type_description/cli.py, and then progressing to the other changes.

Notes

  • I verified that no updates were required in other parts of rosidl, such as rosidl_python and rosidl_typesupport.

This is an automatic backport of pull request #857 done by [Mergify](https://mergify.com).

* Add type description support to rosidl_cli

Signed-off-by: Francisco Rossi <frossi@ekumenlabs.com>

* Fix typing annotation

Signed-off-by: Francisco Rossi <frossi@ekumenlabs.com>

* Please flake8, mypy

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Please flake8 take 2

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

---------

Signed-off-by: Francisco Rossi <frossi@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
(cherry picked from commit c9a3084)

# Conflicts:
#	rosidl_cli/rosidl_cli/cli.py
#	rosidl_cli/rosidl_cli/command/generate/api.py
#	rosidl_cli/rosidl_cli/command/generate/extensions.py
#	rosidl_cli/rosidl_cli/command/helpers.py
@mergify
Copy link
Contributor Author

mergify bot commented May 12, 2025

Cherry-pick of c9a3084 has failed:

On branch mergify/bp/jazzy/pr-857
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit c9a3084.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   rosidl_cli/rosidl_cli/command/generate/__init__.py
	new file:   rosidl_cli/rosidl_cli/command/hash/__init__.py
	new file:   rosidl_cli/rosidl_cli/command/hash/api.py
	new file:   rosidl_cli/rosidl_cli/command/hash/extensions.py
	modified:   rosidl_generator_c/rosidl_generator_c/cli.py
	modified:   rosidl_generator_cpp/rosidl_generator_cpp/cli.py
	modified:   rosidl_generator_type_description/rosidl_generator_type_description/__init__.py
	new file:   rosidl_generator_type_description/rosidl_generator_type_description/cli.py
	new file:   rosidl_generator_type_description/setup.cfg
	modified:   rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/cli.py
	modified:   rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/cli.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rosidl_cli/rosidl_cli/cli.py
	both modified:   rosidl_cli/rosidl_cli/command/generate/api.py
	both modified:   rosidl_cli/rosidl_cli/command/generate/extensions.py
	both modified:   rosidl_cli/rosidl_cli/command/helpers.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

@hidmic can you resolve the conflicts?

@hidmic
Copy link
Contributor

hidmic commented May 12, 2025

@fujitatomoya on it

@hidmic
Copy link
Contributor

hidmic commented May 12, 2025

@fujitatomoya FYI #868, once merged this PR will pass CI.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@fujitatomoya
Copy link
Contributor

Pulls: #867
Gist: https://gist.githubusercontent.com/fujitatomoya/7a8d6089390a9ff94c1d7081b9c066ef/raw/18b726a17ab41c7935e16b5c5a753d771904ae48/ros2.repos
BUILD args:
TEST args:
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15969

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

@frneer
Copy link
Contributor

frneer commented May 14, 2025

@fujitatomoya FYI CI failed but it seems to me it's because of a Jenkins issue?
https://ci.ros2.org/job/ci_linux/23600/console#console-section-8

@fujitatomoya
Copy link
Contributor

CI:

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

@hidmic hidmic mentioned this pull request May 14, 2025
@hidmic
Copy link
Contributor

hidmic commented May 14, 2025

That Linux job failed again with a Jenkins fluke, but https://build.ros2.org/job/Jpr__rosidl__ubuntu_noble_amd64/11 still pointed me to a linter issue. See #870.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@fujitatomoya
Copy link
Contributor

Pulls: #867
Gist: https://gist.githubusercontent.com/fujitatomoya/720300f60909356405f1d0b83e677c41/raw/18b726a17ab41c7935e16b5c5a753d771904ae48/ros2.repos
BUILD args:
TEST args:
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15989

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

@hidmic
Copy link
Contributor

hidmic commented May 15, 2025

Windows CI failed on a missing dependency.

@fujitatomoya once you squash merge, DCO failure should go away. The first commit is signed-off.

@fujitatomoya fujitatomoya merged commit 55212db into jazzy May 15, 2025
3 checks passed
@fujitatomoya
Copy link
Contributor

@hidmic @frneer merged to jazzy, thanks for checking on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants