Skip to content

ci: add lint and package checks - #35

Open
esteve wants to merge 15 commits into
ros2-rust:mainfrom
esteve:ci/add-lint-and-checks
Open

ci: add lint and package checks#35
esteve wants to merge 15 commits into
ros2-rust:mainfrom
esteve:ci/add-lint-and-checks

Conversation

@esteve

@esteve esteve commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

esteve added 4 commits June 15, 2026 10:52
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve
esteve force-pushed the ci/add-lint-and-checks branch from 2b9946e to fc9e4e5 Compare June 15, 2026 17:00
Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve
esteve force-pushed the ci/add-lint-and-checks branch from fc9e4e5 to 2be188e Compare June 15, 2026 17:02
esteve added 10 commits June 15, 2026 19:07
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
maspe36 pushed a commit that referenced this pull request Aug 10, 2026
… index

Generated interface crates opt into `ros-env` by default since #21
(`[package.metadata.ros-env] include = true` in the Cargo.toml template),
which means they are `include!()`d from the source installed to
`share/<pkg>/rust` rather than resolved as Cargo dependencies.

The `rust_packages` ament index resource exists only so that
`colcon-ros-cargo` can emit a `[patch.crates-io.<pkg>]` entry for packages
that *are* real Cargo dependencies. Registering generated crates therefore
produces a patch that nothing in the dependency graph uses, and Cargo
records those as `[[patch.unused]]` in every consumer's `Cargo.lock`. That
makes the lockfile depend on whichever interface packages happen to be
present on the prefix: locks differ between machines and `--locked` builds
fail on any extra patched crate.

Stop registering the resource. The `install(DIRECTORY ...)` of the crate
source is kept, since that is what `ros-env` reads from `AMENT_PREFIX_PATH`.

This is the generator-side counterpart of cargo-ament-build PR #35, which
already skips the same marker for `ament_cargo` packages that opt into
`ros-env`.

Verified with a two-package workspace (an `ament_cmake` interface package
plus an `ament_cargo` node consuming it through `ros-env`) built with
cargo-ament-build 0.1.11 and colcon-ros-cargo 0.2.0. Before the change the
marker file, the `[patch.crates-io]` entry and a `[[patch.unused]]` block
for the interface package are all present; after it all three are gone and
the node still compiles and links.

Note this is a behaviour change for consumers that still declare generated
interface crates as direct Cargo dependencies: those relied on
`colcon-ros-cargo` patching them in and should migrate to `ros-env`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant