Trailing newline in rosdep install on Windows
nnmm opened this issue · 8 comments
Description
install_rosdeps.sh
on Windows passes paths with trailing newlines to rosdep install
.
Expected Behavior
The install_rosdeps.sh
step works on Windows.
Actual Behavior
The install_rosdeps.sh
step fails on Windows with an error message like
given path 'src\r3ydc6px8z\my_package
' does not exist
The path has a trailing newline, which it doesn't on Ubuntu, and I suspect that this is the cause for the failure.
To Reproduce
See https://github.com/ros2-rust/ros2_rust/runs/7827723402?check_suite_focus=true
System (please complete the following information)
- OS: Windows
- ROS 2 Distro: Foxy
Additional context
This occurred while adding a Windows workflow to the ros2_rust repo. See ros2-rust/ros2_rust#222
Interesting, thanks for bringing this up @nnmm.
It seems like this is handled fine on Ubuntu:
++ colcon list --paths-only --packages-up-to examples_rclrs_message_demo examples_rclrs_minimal_client_service examples_rclrs_minimal_pub_sub rclrs rclrs_example_msgs rosidl_generator_rs rosidl_runtime_rs
+ package_paths='src/mo0f04hva3p/ros2_rust/examples/message_demo
src/mo0f04hva3p/ros2_rust/examples/minimal_client_service
src/mo0f04hva3p/ros2_rust/examples/minimal_pub_sub
src/mo0f04hva3p/ros2_rust/rclrs
src/mo0f04hva3p/ros2_rust/rclrs_example_msgs
src/mo0f04hva3p/ros2_rust/rosidl_generator_rs
src/mo0f04hva3p/ros2_rust/rosidl_runtime_rs
src/ros2/common_interfaces/std_msgs
src/ros2/example_interfaces
src/ros2/rcl_interfaces/action_msgs
src/ros2/rcl_interfaces/builtin_interfaces
src/ros2/rosidl_defaults/rosidl_default_generators
src/ros2/rosidl_defaults/rosidl_default_runtime
src/ros2/unique_identifier_msgs'
+ rosdep install -r --from-paths src/mo0f04hva3p/ros2_rust/examples/message_demo src/mo0f04hva3p/ros2_rust/examples/minimal_client_service src/mo0f04hva3p/ros2_rust/examples/minimal_pub_sub src/mo0f04hva3p/ros2_rust/rclrs src/mo0f04hva3p/ros2_rust/rclrs_example_msgs src/mo0f04hva3p/ros2_rust/rosidl_generator_rs src/mo0f04hva3p/ros2_rust/rosidl_runtime_rs src/ros2/common_interfaces/std_msgs src/ros2/example_interfaces src/ros2/rcl_interfaces/action_msgs src/ros2/rcl_interfaces/builtin_interfaces src/ros2/rosidl_defaults/rosidl_default_generators src/ros2/rosidl_defaults/rosidl_default_runtime src/ros2/unique_identifier_msgs --ignore-src --skip-keys 'rti-connext-dds-5.3.1 ' --rosdistro rolling -y
(from: https://github.com/ros2-rust/ros2_rust/runs/7839025061?check_suite_focus=true#step:10:135)
but not on Windows:
++ colcon list --paths-only --packages-up-to examples_rclrs_message_demo
+ package_paths='src\r3ydc6px8z\ros2_rust\examples\message_demo
src\r3ydc6px8z\ros2_rust\rclrs
src\r3ydc6px8z\ros2_rust\rclrs_example_msgs
src\r3ydc6px8z\ros2_rust\rosidl_generator_rs
src\r3ydc6px8z\ros2_rust\rosidl_runtime_rs
src\ros2\rosidl_defaults\rosidl_default_generators
src\ros2\rosidl_defaults\rosidl_default_runtime'
+ rosdep install -r --from-paths 'src\r3ydc6px8z\ros2_rust\examples\message_demo
' 'src\r3ydc6px8z\ros2_rust\rclrs
' 'src\r3ydc6px8z\ros2_rust\rclrs_example_msgs
' 'src\r3ydc6px8z\ros2_rust\rosidl_generator_rs
' 'src\r3ydc6px8z\ros2_rust\rosidl_runtime_rs
' 'src\ros2\rosidl_defaults\rosidl_default_generators
' 'src\ros2\rosidl_defaults\rosidl_default_runtime' --ignore-src --skip-keys 'rti-connext-dds-5.3.1 ' --rosdistro foxy -y
given path 'src\r3ydc6px8z\ros2_rust\examples\message_demo
' does not exist
(from: https://github.com/ros2-rust/ros2_rust/runs/7827723402?check_suite_focus=true#step:11:115)
I think a simple pipe through tr '\n' ' '
after colcon list ...
might fix this. Hopefully it works on Windows. I'll try to do this soon.
@nnmm note that I think rosdep
doesn't work on Windows, though:
@christophebedard Thanks. It looks the same with that branch unfortunately: https://github.com/ros2-rust/ros2_rust/runs/7898904995?check_suite_focus=true
If rosdep doesn't work, is there some way to tell action-ros-ci
to skip that step? action-ros-ci
is supposed to work with Windows, right?
@nnmm ahh I quickly looked at CI for my PR and thought my fixed worked, but it didn't. I'll try to do a proper fix.
If rosdep doesn't work, is there some way to tell
action-ros-ci
to skip that step?
We can always add an option to skip rosdep
, but it shouldn't make the CI job fail since we're using a trailing || true
:
action-ros-ci/src/action-ros-ci.ts
Line 186 in e0eeca0
colcon build
step, although I'm not quite sure why it fails.
action-ros-ci is supposed to work with Windows, right?
Not fully, unfortunately, see #725. Windows support has always been partial and finicky.
@christophebedard Have you had a chance to look for a proper fix yet? :)
@nnmm I have not, but since rosdep
basically doesn't do anything on Windows currently, that step should just be skipped. I'll try to do that tomorrow.