Repository navigation
Use get_package_share_path just as python (backport #112) - #119
mergify[bot] wants to merge 1 commit into
Conversation
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
|
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 |
| <<<<<<< HEAD | ||
| ======= | ||
| [[deprecated("Use get_package_share_path(...) instead")]] | ||
| >>>>>>> acfcac6 (Use get_package_share_path just as python (#112)) |
There was a problem hiding this comment.
we shouldn't include this deprecation in this backport
| /// Return the share directory of the given package if found. | ||
| /** | ||
| * \param[in] package_name the name of the package to locate. | ||
| * \param[out] path share path of the package. | ||
| * \return | ||
| * \throws PackageNotFoundError when the given package is not found. | ||
| */ | ||
| [[deprecated("Use get_package_share_path(...) instead")]] | ||
| 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.
I guess we should just remove this one
| void get_package_share_directory( | ||
| const std::string & package_name, | ||
| std::filesystem::path & path) | ||
| { | ||
| path = get_package_share_path(package_name); |
|
Humble uses c++14 and thus no |
|
Makes sense. |
|
Humble targets c++17 |
|
Appologies! I was mistaken. Feel free to open a PR!
That's a bummer. I prefer they only remove these things once all active distros are suppored. :/ |
It looks like #111 is needed first.. |
|
Tick the box to add this pull request to the merge queue (same as
|
|
so it seems like some of the core packages still default to C++14 (in Humble), including At this point I think it might be too late to make the change even if we point to C++17 being the "minimum" in multiple places. |
|
Perhaps we need to keep the previous syntax around in rolling until humble is deprecated? |
|
Alright, so I've looked into it and had a short discussion on Zulip. While we do declare that Humble targets C++17, that's unfortunately not completely true in practice. Some Humble core packages default to C++14, some default to C++17 (like Given that we have rules regarding breaking changes for active distros, and since including We could avoid using Sorry this isn't quite ideal. And sorry for giving you hope and then crushing it 😅 |
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. 🙂
This is an automatic backport of pull request #112 done by Mergify.