boa icon indicating copy to clipboard operation
boa copied to clipboard

Thoughts about conda_build_config.yaml

Open wolfv opened this issue 4 years ago • 0 comments

conda build config yaml is a wild beast and we need to get it under control! :)

It has a couple of interesting behaviors, and it would be interesting to see if we can simplify it's behavior.

  1. It allows selection using the comment syntax. But the result of the selection is dependent on the contents of the conda_build_config.yaml, leading to a weird situation where this file needs to be parsed recursively (as far as I understand). For example:
target_platforms:
- linux-aarch64
- linux-64

numpy:
- 1.16  # [linux and x86_64]
- 1.19  # [linux and arm64]
  1. zip-keys are quite cumbersome and hard to grasp as far as I can tell

In my mind, two solutions to these problems could be:

  • have a concrete "context" for the conda-build-config that cannot contain selectors, but sets up the variables that can be used as selectors
  • zip keys could instead be more explicitly used as configuration, like in github actions. Instead of
foo:
        - a
        - a
bar:
        - 1
        - 2
zip_keys:
        - bar
        - foo

Which would result in a, 1 and a, 2 configs, we could invert that and have

combined_keys:
- foo: a
  bar: 1
- foo: a
  bar: 2

This is similar to how github actions handles complicated build matrices, where one can either have

matrix:
- node: [8,9,10]
- os: [macos-latest, ubuntu-latest]

or

matrix:
  include:
  - os: ubuntu-latest
    node: 8
  - os: ubuntu-latest
    node: 9
  - os: ubuntu-latest
    node: 10
  - os: macos-latest
    node: 8
  - os: macos-latest
    node: 9
...

Of course the exact wording would need to be discussed, and the mechanism on how that should work.

wolfv avatar Mar 13 '21 14:03 wolfv