Skip to content

Add variants_mode: local support to get a variants file for package - #158

Merged
traversaro merged 1 commit into
RoboStack:masterfrom
traversaro:add-packages-override
Oct 1, 2026
Merged

traversaro merged 1 commit into
RoboStack:masterfrom
traversaro:add-packages-override

Conversation

@traversaro

@traversaro traversaro commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Supersedes #114 . This implements O2 in #114 (comment) .

This PR adds a variants_mode key to vinca.yaml, that controls how rattler-build receives the
repository-level conda_build_config.yaml:

  • global (default) leaves generated recipes unchanged. Builds must pass the
    root configuration explicitly, for example with
    rattler-build build ... -m ./conda_build_config.yaml.
  • local generates a variants.yaml beside every recipe.yaml. Vinca converts
    legacy comment selectors to v1 selectors and keeps only pins used by that
    package. Builds must not pass the root configuration with -m, because an
    explicit variant file takes precedence over the recipe-local file.

In case variants_mode: local is used, it is possible to specify a per-package variant_overrides in pkg_additional_info.yaml:

my_ros_package:
  variant_overrides:
    c_stdlib_version:
      - '2.28'

this permits to build only a subset of a packages with an higher c_stdlib_version, as required for example in RoboStack/ros-jazzy#167 .

Note that switching from variants_mode: global to variants_mode: local requires changing some files in the ros-<distro> robostack repository, but does not strictly requires a full rebuild.

@traversaro
traversaro requested review from Tobias-Fischer, baszalmstra, wep21 and wolfv and removed request for baszalmstra September 30, 2026 15:49
@traversaro
traversaro merged commit 1cca9e9 into RoboStack:master Oct 1, 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