colcon-cargo
colcon-cargo copied to clipboard
colcon-cargo can't build rclrs as a Cargo workspace "error: package collision in the lockfile"
I've created a workspace version of rclrs (see https://github.com/esteve/ros2_rust/tree/test-rclrs-workspace), with only rclrs and examples_rclrs_minimal_pub_sub.
When building via colcon I get the following error:
$ colcon build --packages-up-to examples_rclrs_minimal_pub_sub rclrs
...
Starting >>> rclrs
Finished <<< rclrs [1.79s]
Starting >>> examples_rclrs_minimal_pub_sub
--- stderr: examples_rclrs_minimal_pub_sub
error: package collision in the lockfile: packages rclrs v0.4.1 (/var/home/esteve/Projects/ros2-rust/ros2_rust_ws/install/rclrs/share/rclrs/rust) and rclrs v0.4.1 (/var/home/esteve/Projects/ros2-rust/ros2_rust_ws/src/ros2_rust/rclrs) are different, but only one can be written to lockfile unambiguously
---
Failed <<< examples_rclrs_minimal_pub_sub [1.17s, exited with code 1]
Summary: 16 packages finished [7.79s]
1 package failed: examples_rclrs_minimal_pub_sub
2 packages had stderr output: examples_rclrs_minimal_pub_sub rclrs
the Cargo.toml file for the workspace is as follows:
[workspace]
members = [
"rclrs",
"examples/minimal_pub_sub",
]
resolver = "2"