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

Trailing newline in rosdep install on Windows #766

Closed
nnmm opened this issue Aug 14, 2022 · 8 comments · Fixed by #773
Closed

Trailing newline in rosdep install on Windows #766

nnmm opened this issue Aug 14, 2022 · 8 comments · Fixed by #773
Labels
bug Something isn't working

Comments

@nnmm
Copy link

nnmm commented Aug 14, 2022

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

@nnmm nnmm added the bug Something isn't working label Aug 14, 2022
@christophebedard christophebedard transferred this issue from ros-tooling/setup-ros Aug 15, 2022
@christophebedard
Copy link
Member

christophebedard commented Aug 15, 2022

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.

@christophebedard
Copy link
Member

@nnmm could you try #767? e.g. ros-tooling/action-ros-ci@fix-rosdep-install-trailing-newline-windows

@christophebedard
Copy link
Member

christophebedard commented Aug 16, 2022

@nnmm
Copy link
Author

nnmm commented Aug 18, 2022

@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?

@christophebedard
Copy link
Member

@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:

)}" --rosdistro $DISTRO -y || true`;
. In your case, it seems to be failing at the 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.

@nnmm
Copy link
Author

nnmm commented Sep 10, 2022

@christophebedard Have you had a chance to look for a proper fix yet? :)

@christophebedard
Copy link
Member

@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.

@christophebedard
Copy link
Member

@nnmm see #773

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
2 participants