-
Notifications
You must be signed in to change notification settings - Fork 54
fatal error wasn't being triggered until after list(SORT ...) error would happen #2
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
Conversation
|
My commit description was awful. The problem is that the list(SORT ...) command would return an error if the "list" was an empty string. |
|
+1 |
|
|
|
ok, so perhaps the change should be to only call list(SORT ...) if the "list" is indeed non-empty ? if so, I'll put the error message back where it was, and put a conditional around the call to list(SORT ...) |
|
I don't know why you would need a conditional - the following works for me with CMake: |
|
at least on cmake 2.8.12.2, it prints this: CMake Error at /home/mquigley/ros2_ws/install/share/rmw_implementation/cmake/get_available_rmw_implementations.cmake:23 (list): i assumed that meant that the parameter to list(SORT) was empty, but perhaps it's a different failure mode |
|
Ah, I think the difference is that variable in this case isn't defined: it's not an empty string, it's undefined. |
|
sorry, i'm just really confused. I think it is actually defined, but it's indeed a zero-length string. actually, i have no idea what's going on |
|
While it is being set in https://github.com/ament/ament_cmake/blob/9048899acba0a095dfbddf7f2645d3c8f2937bfa/ament_cmake_core/cmake/index/ament_index_get_resources.cmake#L60 it looks like that the variable is not defined in the parent scope afterwards. A simple test proves that: |
|
The easiest fix is probable to add the following lines after the |
|
ok thanks, that indeed makes it behave as expected. I'll update the PR. |
|
what I still don't quite understand is that, unless you include that set() call you suggest, the following conditional doesn't get triggered when there aren't any rmw implementations: I thought that the STREQUAL would be true even if |
|
Yes, https://github.com/ros2/rmw_implementation/pull/2/files#diff-9e242b1962e7673fca91ac5667e8e57cL27 will result in a fatal error message when The error message is intended if you ask for the default implementation and there is none. But there should be no fatal error when only asking for a list of available rmw implementations. |
956301e to
4c25526
Compare
fatal error wasn't being triggered until after list(SORT ...) error would happen
…cutor Renaming
No description provided.