prefix-dev / rattler-build

rattler-build is a universal package builder for Windows, macOS and Linux
https://prefix-dev.github.io/rattler-build
BSD 3-Clause "New" or "Revised" License
185 stars 38 forks source link

feat: use implicit variants.yaml #980

Closed baszalmstra closed 1 month ago

baszalmstra commented 1 month ago

This PR adds reading from a variants.yaml file next to the recipe.yaml file without having to specify a config file on the command line.

This is especially useful when using the --recipe-dir option.

Some questions:

Do not merge, I need to add tests.

Fixes #974

wolfv commented 1 month ago

I think the configuration file "closest" to the recipe should win, but I am not sure what to do when we add variant files from the CLI as well ... e.g. -m variant.yaml. Should we then ignore them, and add another flag (--use-variant-next-to-recipe)?

wolfv commented 1 month ago

Or with a glob somehow --variant */variant.yaml, but only use the globs that also match the recipe prefix ...

baszalmstra commented 1 month ago

Personally Im more inclined to make this the default behavior and have the option to opt out instead.

baszalmstra commented 1 month ago

Personally Im more inclined to make this the default behavior and have the option to opt out instead.

Perhaps a --ignore-recipe-variants flag? (I hate more flags)

wolfv commented 1 month ago

yes, flag works for me!