Skip to content

std_msgs version 4.2.3 is yanked #472

@George-Gi

Description

@George-Gi

Hi, I noticed that std_msgs crate is yanked.

error: failed to select a version for the requirement `std_msgs = "*"`
  version 4.2.3 is yanked
location searched: crates.io index

what is the suggested solution to this?

Activity

maspe36

maspe36 commented on Apr 11, 2025

@maspe36
Collaborator

Hi @George-Gi, this is due to our complex message generation and consumption pipeline. When you put std_msgs = "*" in your Cargo.toml, there should be an accompanying .cargo/config.toml file in the root of your colcon workspace which "patches" any dependency on a std_msgs crate with some local crate. The local crate we patch to, should be generated by the rosidl_generator_rs package when you colcon build within a workspace which also has an interfaces package containing .msg etc files.

So if you're seeing this issue, it generally means one of these things

  1. You may not have built with colcon yet.
    Does the .cargo/ folder exist in the root of your workspace?

  2. You may not have the rosidl_generator_rs and/or std_msgs package(s) in your workspace or a sourced overlay
    Does the .cargo/config.toml file exist but there are no entries?


I recognize this is really quite confusing, you're not the first person to bring this up and you won't be the last. There is an ongoing community discussion on how we might simplify this experience (#471) if you're interested.

George-Gi

George-Gi commented on Apr 14, 2025

@George-Gi
Author

Hi @George-Gi, this is due to our complex message generation and consumption pipeline. When you put std_msgs = "*" in your Cargo.toml, there should be an accompanying .cargo/config.toml file in the root of your colcon workspace which "patches" any dependency on a std_msgs crate with some local crate. The local crate we patch to, should be generated by the rosidl_generator_rs package when you colcon build within a workspace which also has an interfaces package containing .msg etc files.

So if you're seeing this issue, it generally means one of these things

  1. You may not have built with colcon yet.
    Does the .cargo/ folder exist in the root of your workspace?
  2. You may not have the rosidl_generator_rs and/or std_msgs package(s) in your workspace or a sourced overlay
    Does the .cargo/config.toml file exist but there are no entries?

I recognize this is really quite confusing, you're not the first person to bring this up and you won't be the last. There is an ongoing community discussion on how we might simplify this experience (#471) if you're interested.

Hi @maspe36 , thank you for the reply. I didn't realize from the instructions that it is necessary to install the generator and the rest of the repo. I thought this was optional only for development purposes and that by including only the relevant dependency in the Cargo.toml should do the job. So, cloning the whole repo is mandatory, right? My intention was to create the smallest possible container, that's why I want to avoid any extra stuff, not required.

maspe36

maspe36 commented on May 8, 2025

@maspe36
Collaborator

You don't need to clone the whole ros2_rust repo, you can pull rclrs from crates.io via your crates Cargo.toml. But at the moment, the rosidl_rust package (which includes rosidl_generator_rs) needs to be in some underlay or the current colcon workspace.

We are in a weird transitional period where rosidl_rust is working its way into the rolling release[1]. Soon it should be sufficient to just pull rclrs from crates.io to write Rust-y ROS 2 nodes.


  1. Formal Decision: Add rosidl_rust to REP 2005 (ROS Project Charter - article 4.9.ii)

    Motion: @wjwwood, Second: @ahcorde, passed by consensus

https://discourse.ros.org/t/ros-pmc-minutes-for-april-22-2025/43346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @maspe36@George-Gi

        Issue actions

          std_msgs version 4.2.3 is yanked · Issue #472 · ros2-rust/ros2_rust