Skip to content

extends: build a vinca.yaml on top of a shared one - #163

Merged
traversaro merged 3 commits into
RoboStack:masterfrom
Tobias-Fischer:feat/config-layering
Oct 15, 2026
Merged

traversaro merged 3 commits into
RoboStack:masterfrom
Tobias-Fischer:feat/config-layering

Conversation

@Tobias-Fischer

@Tobias-Fischer Tobias-Fischer commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

This lets several configurations share one base, e.g. one vinca.yaml per ROS 2 distribution on top of a shared one, as RoboStack's monorepo does:

# distros/jazzy/vinca.yaml
extends: ../../shared/vinca.yaml
ros_distro: jazzy
mutex_package:
  version: 0.19.0
  run_constraints:
    - libprotobuf 7.35.*   # replaces the shared libprotobuf constraint

How the layers combine:

  • packages_select_by_deps, packages_exclude and packages_skip are combined, base first.
  • mutex_package is merged: the extending file's keys win, and its run_constraints replace the base's constraint on the same package and add the others.
  • Any other key of the extending file replaces the base's.
  • The files next to each configuration are combined:
    • pkg_additional_info.yaml and <patch_dir>/dependencies.yaml: per package, the extending file's keys win;
    • patches and tests/: per package, the extending file's file wins;
    • conda_index files: the extending file's mappings are looked up first.
  • A base can itself extend another file, and cycles are rejected.

Paths (patch_dir, the snapshot paths, conda_index files) are now resolved relative to the file that sets them, rather than the working directory. vinca is normally run in the directory of its vinca.yaml, so that resolves to the same paths. vinca-gha's additional-recipes check now reads the layered configuration, so skip_existing from a base is seen too.

Tests: six new tests cover lists, scalars, selectors, the mutex merge, per-layer files, file-relative paths and cycle detection. All 267 tests pass, ruff and pyrefly are clean, and the README documents extends.

Checked against RoboStack: RoboStack's monorepo previously did this merging in its own scripts. With this branch, its distributions' vinca.yaml files just extend the shared one, and the generated recipes are identical (rolling, lyrical, jazzy and humble on linux-64, and humble on win-64).

🤖 Generated with Claude Code

Tobias-Fischer and others added 3 commits October 10, 2026 14:25
A configuration can extend another one (relative path). Package lists are combined,
mutex_package is merged (run_constraints replaced per package), other keys of the
extending file win. pkg_additional_info.yaml, dependencies.yaml, patches, tests and
conda_index files of every layer are combined, each relative to its configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-gha reads the layered configuration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recipe refers to patch/<file>; the template copies the patch from its configuration's
patch directory. Before, a path relative to a common root was copied relative to the
working directory, which broke for patches outside it (e.g. with extends).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@traversaro

Copy link
Copy Markdown
Member

Builds on #162, so its first two commits are #162's. Please review and merge #162 first.

That PR has been merged, can you update the PR description?

@Tobias-Fischer

Copy link
Copy Markdown
Contributor Author

Builds on #162, so its first two commits are #162's. Please review and merge #162 first.

That PR has been merged, can you update the PR description?

Done :). Would you mind taking a quick look please @traversaro?

@traversaro
traversaro merged commit 6b1a3d1 into RoboStack:master Oct 15, 2026
3 checks passed
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.

2 participants