Open pavelzw opened 1 month ago
There is one (semi-working) workaround:
name: ${{ name }}-${{ variant }}
But then it's still missing when printing the variant config:
╭─ Finding outputs from recipe
│ Found 2 variants
│ Build variant: my-package--1.0.0-hcdbb9e0_0
│
│ ╭─────────────────┬───────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪═══════════╡
│ │ target_platform ┆ osx-arm64 │
│ │ variant ┆ a │
│ ╰─────────────────┴───────────╯
│ Build variant: my-package--1.0.0-h89e5c08_0
│
│ ╭─────────────────┬───────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪═══════════╡
│ │ target_platform ┆ osx-arm64 │
│ │ variant ┆ b │
│ ╰─────────────────┴───────────╯
│
╰─────────────────── (took 0 seconds)
I think we should already load the variant and inject it here:
https://github.com/prefix-dev/rattler-build/blob/main/src/variant_config.rs#L396
Because the used_vars
are discovered correctly.
I thought string concatenation in (mini)jinja used ~
not +
I think both work? But this is also the same problem as #1011 :)
Although ~
seems to convert the elements to strings, so it might deal with undefined
better.
There is one (semi-working) workaround:
name: ${{ name }}-${{ variant }}
I experienced this in pin_subpackage
, so unfortunately this doesn't fix it for me
@pavelzw you could try using ~
.
Yes, ~
seems to work 🤔
(Although 'foo' + 'bar'
also works while var + 'bar'
doesn't)
Feel free to close this issue if you think we should just use ~
😃
Yeah, I think ~
casts (even an undefined value) to a string. While +
needs both values to be of matching types.
I do want to fix this issue (also to close #1011)