Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ anyhow = "1"
cargo-manifest = "0.17"
pico-args = "0.4"

# Pinning a transitive dependency of cargo-manifest to the last major version that could build with rust 1.75
indexmap = "=2.11.0"

[dev-dependencies]
tempfile = { version = "3" }

Expand Down
18 changes: 16 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,22 @@ fn fallible_main() -> Result<bool> {
// Putting marker file creation after the actual build command means that
// we create less garbage if the build command failed.
create_package_marker(&args.install_base, "packages", package_name)?;
// This marker is used by colcon-ros-cargo when looking for dependencies
create_package_marker(&args.install_base, "rust_packages", package_name)?;

// If this package should be re-exported by rclrs, we do not want `colcon-ros-cargo` to
// find the package as it should not be patched.
let reexport_rclrs = package
.metadata
.as_ref()
.and_then(|m| m.get("rclrs"))
.and_then(|r| r.get("reexport"))
.and_then(|v| v.as_bool())
.unwrap_or(false);

if !reexport_rclrs {
// This marker is used by colcon-ros-cargo when looking for dependencies
create_package_marker(&args.install_base, "rust_packages", package_name)?;
}

install_package(
&args.install_base,
package_path,
Expand Down