Repository navigation
Use get_package_share_path just as python - #112
Conversation
9df7db4 to
9781967
Compare
Signed-off-by: Tim Clephas <[email protected]>
Signed-off-by: Tim Clephas <[email protected]>
Signed-off-by: Tim Clephas <[email protected]>
9781967 to
a3b1568
Compare
|
I like the change. It's way cleaner than the previous version. |
| */ | ||
| AMENT_INDEX_CPP_PUBLIC | ||
| void | ||
| get_package_share_directory(const std::string & package_name, std::filesystem::path & path); |
There was a problem hiding this comment.
we need to update downstream packages
There was a problem hiding this comment.
How? Or to what?
Or do we (shortly) keep this function around for depreciation?
There was a problem hiding this comment.
I think the API in question was added after kilted and therefore we can directly remove/replace it before the next release.
Removing this API will break all the tests etc that were already moved to the new API and need to be fixed.
E.g. if you check out the full rolling stack and remove the old API fix all compile failures resulting from this and do PRs for it.
There was a problem hiding this comment.
And then merge simultaneously?
Then we would need someone with merge access to all these repos I guess?
Edit: or we can let everyone merge at their own pace I guess
There was a problem hiding this comment.
I have permission to merge PRs across all the ROS 2 core.
We should deprecate the method instead of removing it
There was a problem hiding this comment.
I deprecated the previous implementation. So this can be merged and the other repositories will get a deprecation warning.
Signed-off-by: Tim Clephas <[email protected]>
|
Pulls: #112, ros2/rmw_zenoh#913, ros2/rviz#1671, ros/resource_retriever#119, ros/ros_tutorials#193, ros-perception/image_common#391 |
ahcorde
left a comment
There was a problem hiding this comment.
Windows is not compiling
utest.cpp
utest.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::filesystem::path __cdecl ament_index_cpp::get_package_share_path(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?get_package_share_path@ament_index_cpp@@YA?AVpath@filesystem@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z) referenced in function "private: virtual void __cdecl AmentIndexCpp_get_package_share_path_Test::TestBody(void)" (?TestBody@AmentIndexCpp_get_package_share_path_Test@@EEAAXXZ) [C:\ci\ws\build\ament_index_cpp\ament_index_cpp_utest.vcxproj]
C:\ci\ws\build\ament_index_cpp\Release\ament_index_cpp_utest.exe : fatal error LNK1120: 1 unresolved externals [C:\ci\ws\build\ament_index_cpp\ament_index_cpp_utest.vcxproj]Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: Tim Clephas <[email protected]>
Signed-off-by: Tim Clephas <[email protected]>
Found a wrong include, I hope windows works now? |
|
Pulls: #112, ros2/rmw_zenoh#913, ros2/rviz#1671, ros/resource_retriever#119, ros/ros_tutorials#193, ros-perception/image_common#391 |
|
Is there a source of truth somewhere for deprecations and deletions and their associated PRs? A docs.ros.org page? A ROS discourse post? When moveit2 rolling starts failing CI jobs around deprecations, it takes me a frustrating amount of time for me to find the particular GH organization and repo associated with that breakage to understand and fix it, whether that is something in rclcpp, ament, tf, etc. I imagine if this existed/was more widely known, more package maintainers would mention the deprecation/deletion PR in their issue, which would make it easier for other package maintainers to do their migration. |
…and ament_index_cpp::get_package_share_directory(*, *) to ament_index_cpp::get_package_share_path(package_name) addressing ament/ament_index#112 Revert QT support changes which will be addressed in a separate PR Temporarily add '-Wno-error=deprecated-declarations' to suppress other upstream deprecatios from short circuiting CI
|
Can this be backported to active distro's? Minus the deprecation message of course. To prevent these kind of constructions for packages that use a single branch for all active distros: https://github.com/moveit/moveit2/pull/3705/changes#diff-c5eab2d24cfc0cc52d9d0fadc0596533f00ca45e3f8ea45a31bcd8c72b34fafaR40 |
|
@Mergifyio backport kilted jazzy humble |
✅ Backports have been createdDetails
Cherry-pick of acfcac6 has failed: 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
Cherry-pick of acfcac6 has failed: 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
Cherry-pick of acfcac6 has failed: 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 |
@Timple I triggered the automatic backport PRs. Would you be willing to open PRs against those branches in order to fix conflicts and adapt them to the older distros? I've posted some quick comments on all PRs. |
Signed-off-by: Tim Clephas <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> (cherry picked from commit acfcac6) # Conflicts: # ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp # ament_index_cpp/src/get_package_share_directory.cpp # ament_index_cpp/test/utest.cpp
Signed-off-by: Tim Clephas <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> (cherry picked from commit acfcac6) # Conflicts: # ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp # ament_index_cpp/src/get_package_share_directory.cpp # ament_index_cpp/test/utest.cpp
|
Done. Humble isn't possible because |
Signed-off-by: Tim Clephas <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]> (cherry picked from commit acfcac6) Signed-off-by: Tim Clephas <[email protected]> Co-authored-by: Tim Clephas <[email protected]>
(cherry picked from commit acfcac6) Signed-off-by: Tim Clephas <[email protected]> Co-authored-by: Tim Clephas <[email protected]>
…lling The RCLCPP_VERSION_GTE(30, 0, 0) branches added in moveit#3703 for these three files reference a two-argument overload of `ament_index_cpp::get_package_share_directory(package_name, out_path)` that has never existed. Rolling's ament_index_cpp API is `get_package_share_path(package_name)` returning `std::filesystem::path` directly (ament/ament_index#112), and the corresponding header is `get_package_share_path.hpp` — the old `get_package_share_directory.hpp` has been removed. Switch: - Rolling header: `#include <ament_index_cpp/get_package_share_path.hpp>` - Rolling calls: `get_package_share_path(pkg)` returning path directly Pre-Rolling (`#else` branch) keeps the current `get_package_share_directory(pkg)` returning `std::string`. Verified with a full source-build of moveit2 + downstream against `ubuntu:resolute` + ROS Rolling (`ros2-testing` apt). Co-Authored-By: Claude Opus 4.7 <[email protected]>
…lling The RCLCPP_VERSION_GTE(30, 0, 0) branches added in moveit#3703 for these three files reference a two-argument overload of `ament_index_cpp::get_package_share_directory(package_name, out_path)` that has never existed. Rolling's ament_index_cpp API is `get_package_share_path(package_name)` returning `std::filesystem::path` directly (ament/ament_index#112), and the corresponding header is `get_package_share_path.hpp` — the old `get_package_share_directory.hpp` has been removed on the Ubuntu Resolute-based images. Switch: - Feature-test via `__has_include(<ament_index_cpp/get_package_share_path.hpp>)` rather than RCLCPP_VERSION_GTE — the API rename is in ament_index_cpp, not rclcpp, and the two versions can drift (rolling-ci's frozen Noble container has RCLCPP >= 30 but no new header yet). - Rolling: `get_package_share_path(pkg)` returning path directly. - Pre-Rolling: keep `get_package_share_directory(pkg)` returning std::string. Verified with a full source-build of moveit2 + downstream against `ubuntu:resolute` + ROS Rolling (`ros2-testing` apt). Co-Authored-By: Claude Opus 4.7 <[email protected]>
…lling The RCLCPP_VERSION_GTE(30, 0, 0) branches added in moveit#3703 for these three files reference a two-argument overload of `ament_index_cpp::get_package_share_directory(package_name, out_path)` that has never existed. Rolling's ament_index_cpp API is `get_package_share_path(package_name)` returning `std::filesystem::path` directly (ament/ament_index#112), and the corresponding header is `get_package_share_path.hpp` — the old `get_package_share_directory.hpp` has been removed on the Ubuntu Resolute-based images. Guard: RCLCPP_VERSION_GTE(33, 0, 0). The ament_index_cpp rename shipped with rclcpp 33 (Rolling on Ubuntu Resolute). Rolling on Noble was still at rclcpp 30.x with the old header. So the moveit#3703 threshold of 30 was set too early — it was true on both Noble-era rolling (old API) and Resolute-era rolling (new API), which is why the code compiled on Noble-based rolling-ci but chose the wrong branch. Verified with a full source-build of moveit2 + downstream against `ubuntu:resolute` + ROS Rolling (`ros2-testing` apt). Co-Authored-By: Claude Opus 4.7 <[email protected]>
cpp and python were going out of sync.
Besides
Looks much better than
Due to the short-livedness of the
get_package_share_directory(..., std::filesystem::path)syntax, I didn't deprecated it.I can finish this PR including the tests etc if that's appreciated. For now I wanted feedback first. 🙂