You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate that architectures only contain alphanumeric characters and recommend using brackets for multiple architectures.
archictectures:
- build-on: amd64build-for: bad, value
> snapcraft
Error: Architecture 'bad, value' must only contain alphanumeric characters. Use brackets to list multiple architectures: '[arch1, arch2]'.
For more information, check out: https://snapcraft.io/docs/architectures
This validation can be done during yaml validation and should be similar for the core20 and core22 implementations.
This issue is referenced in the documentation and should be updated when completed. (both readthedocs and snapcraft.io/docs)
Breaking changes
This can break previously working core20 snap builds. However the snap themselves are useless; snap install "my-snap_1.0_amd64, arm64.snap" always fails.
Why it needs to get done
Consider the following snapcraft.yaml:
base: core20architectures:
- build-on: amd64run-on: amd64, arm64 # problematic: this is a scalar, not a list
This scenario happens during iterative development. A user starts with a single scalar architecture amd64 and later adds another architecture without adding brackets. So amd64, arm64 is still treated as a scalar. The correct syntax is a yaml list: [amd64, arm64].
In core20, this is allowed. It would produce a snap named my-snap_1.0_amd64, arm64.snap.
In core22, this is not allowed but the error could be improved. It may not be obvious that the square brackets are missing.
What needs to get done
Validate that architectures only contain alphanumeric characters and recommend using brackets for multiple architectures.
This validation can be done during yaml validation and should be similar for the core20 and core22 implementations.
This issue is referenced in the documentation and should be updated when completed. (both readthedocs and snapcraft.io/docs)
Breaking changes
This can break previously working core20 snap builds. However the snap themselves are useless;
snap install "my-snap_1.0_amd64, arm64.snap"
always fails.Why it needs to get done
Consider the following snapcraft.yaml:
This scenario happens during iterative development. A user starts with a single scalar architecture
amd64
and later adds another architecture without adding brackets. Soamd64, arm64
is still treated as a scalar. The correct syntax is a yaml list:[amd64, arm64]
.In core20, this is allowed. It would produce a snap named
my-snap_1.0_amd64, arm64.snap
.In core22, this is not allowed but the error could be improved. It may not be obvious that the square brackets are missing.
source: https://bugs.launchpad.net/snapcraft/+bug/2009520
The text was updated successfully, but these errors were encountered: