-
Notifications
You must be signed in to change notification settings - Fork 14
Description
We have experienced a lot of pain with Cargo.lock files when working on our Rust packages in a ROS 2 workspace due to the shared .cargo/config.toml at the root of the ROS 2 workspace.
The issue that we are facing is that the .cargo/config.toml contains patch entries for all Rust packages that are present in the workspace and Cargo.lock files in each package end up containing entries for packages even if they are not a dependency in the form of unused patch entries.
[[patch.unused]]
name = "rcl_interfaces"
version = "2.0.3"
[[patch.unused]]
name = "rosgraph_msgs"
version = "2.0.3"
[[patch.unused]]
name = "sensor_msgs"
version = "5.3.6"
[[patch.unused]]
name = "test_msgs"
version = "2.0.3"This means the lock files depend on the set of packages that are currently in my ROS 2 workspace and this can cause a lot of conflicts when working with different people that have different sets of packages in their workspace or even when working alone from different workspaces.
This issue was so bad for us that it forced us to remove our lock files from git because of all the merge conflicts.
Is there a way we can improve the situation? I was thinking of going in the direction of having one .cargo/config.toml for each package. But then I saw this comment ros2-rust/ros2_rust#553 (comment) with a valid reason not do that.