Skip to content

Set clang-format key to clang-tools-extra on RHEL#41591

Merged
cottsay merged 4 commits intoros:masterfrom
christophebedard:christophebedard/rhel-clang-format-rosdep-key
Jun 11, 2024
Merged

Set clang-format key to clang-tools-extra on RHEL#41591
cottsay merged 4 commits intoros:masterfrom
christophebedard:christophebedard/rhel-clang-format-rosdep-key

Conversation

@christophebedard
Copy link
Copy Markdown
Member

@christophebedard christophebedard commented Jun 11, 2024

Please add the following dependency to the rosdep database.

Package name:

Set clang-format to clang-tools-extra on RHEL.

Package Upstream Source:

N/A

Purpose of using this:

ros-jazzy-ament-clang-format depends on clang-format on Ubuntu, but not on RHEL. The rosdep entry for clang-format on RHEL is clang, which does not provide clang-format. The RHEL package that provides clang-format is apparently clang-tools-extra: ros-tooling/setup-ros#694 (comment).

Since clang-tidy also maps to clang-tools-extra on RHEL and skips RHEL 7, I've done the same for clang-format.

Links to Distribution Packages

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard christophebedard requested a review from a team as a code owner June 11, 2024 15:48
@github-actions github-actions bot added the rosdep Issue/PR is for a rosdep key label Jun 11, 2024
Copy link
Copy Markdown
Member

@cottsay cottsay left a comment

Choose a reason for hiding this comment

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

Thanks, it looks like fedora is in the same boat. Mind fixing that as well?

https://packages.fedoraproject.org/pkgs/clang/clang-tools-extra/

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard
Copy link
Copy Markdown
Member Author

christophebedard commented Jun 11, 2024

Since clang-tidy also maps to clang-tools-extra on RHEL and skips RHEL 7, I've done the same for clang-format.

Oops, I didn't commit that part. Fixed.

Thanks, it looks like fedora is in the same boat. Mind fixing that as well?

https://packages.fedoraproject.org/pkgs/clang/clang-tools-extra/

Done!

It looks like it might be the same for alpine too, but I can only find packages with the clang version in the name, e.g., clang18-extra-tools: https://pkgs.alpinelinux.org/packages?name=clang*tools&branch=edge&repo=&arch=x86_64&maintainer=. Unless I'm missing something, the current value for clang-tidy for alpine is clang-extra-tools, which doesn't exist(?).

rosdep/base.yaml Outdated
arch: [clang]
debian: [clang-format]
fedora: [clang]
fedora: [clang-tools-extra]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we look at what binaries the clang-format tools provides on Ubuntu, it looks like it provides all of:

/usr/bin/clang-format
/usr/bin/clang-format-diff
/usr/bin/git-clang-format

On RHEL and Fedora, clang-tools-extra provides both clang-format and clang-format-diff, while git-clang-format comes in via the git-clang-format package.

Thus it seems to me that this should be:

Suggested change
fedora: [clang-tools-extra]
fedora: [clang-tools-extra, git-clang-format]

(the same goes for the rhel key below)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

makes sense, done

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I'd like to get @cottsay 's approval again for the latest changes before merging.

@cottsay cottsay merged commit a81d70d into ros:master Jun 11, 2024
@christophebedard christophebedard deleted the christophebedard/rhel-clang-format-rosdep-key branch June 11, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rosdep Issue/PR is for a rosdep key

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants