← Back to issue list

Extend advanced grammer to all keys of snapcraft

View original Github issue

Metadata

Project
snapcraft
Number
#6064
Type
issue
State
open
Author
soumyaDghosh
Labels
Created
2026-02-24 07:01:18+00:00
Updated
2026-02-25 05:20:33+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

I believe the advanced grammar should be usable throughout the complete snapcraft.yaml. Projects targeting multiple architectures currently requires maintaining multiple manifests for multiple architectures. An example pain point is, consider, there are 3 services, only 1 needs to run in both amd64 and arm64, the other 2 are exclusive to only one architecture, how can one handle that? ```yaml app1: command: app1 daemon: simple restart-condition: always restart-delay: 5s app2: command: app2 daemon: simple restart-condition: always restart-delay: 5s after: - on amd64: - app1 app3: command: app3 daemon: simple restart-condition: always restart-delay: 5s after: - on arm64: - app1 ``` I believe this should be fairly simple. Also, another scenario, where I just don't want to build a particular part in one architecture, currently I'll have to do this ```yaml part: override-build: | if [ "${CRAFT_ARCH_BUILD_FOR}" == "arm64" ]; then echo "skipping..." else craftctl default fi ``` But I think this not really a very clean solution. Also, I believe using the advanced grammar on keys like cmake-parameters is also essential and is fairly simple. The current solution is very hacky ```yaml part: cmake-parameters: - -DPI=${PI} - -DX86=${X86} build-environment: - on arm64: - PI: "ON" - X86: "OFF" - on amd64: - X86: "ON" - PI_SNAP: "OFF" ```

Evaluation history

No evaluation history available.