Skip to content
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

fix name of included CMake file for cmake_clang_format #128

Merged
merged 2 commits into from
Mar 5, 2019

Conversation

dirk-thomas
Copy link
Contributor

@dirk-thomas dirk-thomas added bug Something isn't working in review Waiting for review (Kanban column) labels Mar 4, 2019
@dirk-thomas dirk-thomas self-assigned this Mar 4, 2019
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas force-pushed the fix_cmake_clang_format_include branch from 6cf839f to 8c4d59d Compare March 4, 2019 20:22
@AnticliMaxtic
Copy link

Using the same setup as in https://answers.ros.org/question/317464/ament_cmake_clang_format-fails-to-find-ament_clang_format-package/ (where I posted) I now get this error

CMake Error at /root/ros2_ws/ros2_base/install/ament_cmake_clang_format/share/ament_cmake_clang_format/cmake/ament_clang_format.cmake:35 (message):
  ament_clang_format() variable 'ament_clang_format_BIN' must not be empty
Call Stack (most recent call first):
  /root/ros2_ws/ros2_base/install/ament_cmake_clang_format/share/ament_cmake_clang_format/cmake/ament_cmake_clang_format_lint_hook.cmake:27 (ament_clang_format)
  /root/ros2_ws/ros2_base/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
  /root/ros2_ws/ros2_base/install/ament_lint_auto/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake:15 (ament_execute_extensions)
  /root/ros2_ws/ros2_base/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
  /root/ros2_ws/ros2_base/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_package.cmake:66 (ament_execute_extensions)
  CMakeLists.txt:65 (ament_package)


---

@dirk-thomas
Copy link
Contributor Author

Thanks for keep reporting problems. I guess that specific linter has never worked / was never used. I added a commit to the PR - please try it again.

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas force-pushed the fix_cmake_clang_format_include branch from 0adfde4 to a0a70f5 Compare March 5, 2019 19:17
@AnticliMaxtic
Copy link

Awesome, works like a charm. Glad I could be of some use 😜 and thanks for the updates!

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

Although it's natural to avoid redundant cmake labeling, I was a bit confused by the filename being ament_clang_format.cmake when the package name was ament_cmake_clang_format and there is a separate ament_clang_format package (as the earlier authors clearly were as well) but I don't think that renaming the cmake file is necessary.

I haven't run this, so CI might be reasonable to do so in order to make sure that slotting in the python executable works on all platforms, but the changes look sound.

@dirk-thomas
Copy link
Contributor Author

CI might be reasonable to do so in order to make sure that slotting in the python executable works on all platforms

Running CI doesn't make sense since even the completely broken state before the patch never raised a flag since it isn't being used anywhere.

@dirk-thomas dirk-thomas merged commit 03e3898 into master Mar 5, 2019
@dirk-thomas dirk-thomas deleted the fix_cmake_clang_format_include branch March 5, 2019 22:43
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Mar 5, 2019
@mandulaj
Copy link

I always get this error and never find the solution. Here is what works for me:

sudo apt install ros-humble-ament-cmake-clang-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants