← 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
Updated
Closed
—

Current evaluation

Advanced grammar remains limited to selected keys, limiting clean architecture-specific apps, part omission, and plugin parameters. The feature is untriaged; plugin-parameter support is tracked in craft-application #985.

Suggested action: needs triage

Reason: The report provides concrete YAML for architecture-specific apps, skipping parts, and cmake-parameters, but Snapcraft's current processor enumerates only six part keys and apply_yaml does not process top-level apps. The issue has no labels or maintainer assessment, and its sole comment only cross-references the still-open canonical/craft-application#985 for plugin parameters.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 12 Complexity: 68 Confidence: 93 Actionability: 70

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

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 12
Complexity: 68
Confidence: 93
Actionability: 70
needs triage Advanced grammar remains limited to selected keys, limiting clean architecture-specific apps, part omission, and plugin parameters. The feature is untriaged; plugin-parameter support is tracked in craft-application #985.
qwen/qwen3.6-35b-a3b
Impact: 50
Quick Win: 21
Complexity: 40
Confidence: 75
Actionability: 70
needs triage Feature request to extend advanced grammar (on/to/try) to all snapcraft.yaml keys including plugin parameters like cmake-parameters. Untriaged, open for 208 days.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 16
Staleness: 55
Complexity: 65
Confidence: 75
Support Request: 15
needs triage Request to extend advanced grammar (on/to/else) to all snapcraft.yaml keys (apps, plugin params like cmake-parameters, per-arch part skipping). Grammar currently limited to 6 part keys. Unlabeled; cross-referenced to craft-application#985.
qwen/qwen3.6-35b-a3b
Staleness: 55
Complexity: 70
Confidence: 85
Support Request: 10
needs triage Feature request to extend conditional advanced grammar syntax to all snapcraft.yaml keys to avoid multiple manifests or shell workarounds. Open for 148 days with no maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 65
Confidence: 75
Support Request: 10
needs triage Feature request to extend conditional advanced grammar syntax across all snapcraft.yaml keys for multi-arch builds. Currently unlabelled and awaiting maintainer assessment.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-application#985 (confidence 98%)

    The sole issue comment explicitly links it as the location for advanced grammar support in plugin parameters; that issue is open and triaged in craft-application.

Related issues

Issue Project State Summary Similarity
#985 Support Snapcraft advanced grammar in plugin parameters? craft-application open Enhancement to apply advanced grammar to dynamically named plugin parameters; acknowledged as valid, clearly reproduced, and still awaiting implementation and tests.
81%
#5995 Documentation doesn't describe which keys can use advanced grammar snapcraft open Documentation gap: snapcraft's advanced grammar reference page doesn't list which keys support it. A volunteer (@caglarkc) has been assigned by a maintainer (@mr-cal) to document the supported keys.
80%
#1684 Vendor grammar logic into snapcraft snapcraft closed Advanced grammar was extracted to craft-grammar and adopted by Snapcraft in #3642 (merge 943d130c2), superseding the planned in-tree refactor.
76%
#5255 With the advanced grammar, only the last `- to` clause is respected snapcraft open Open, triaged Snapcraft bug: multiple advanced-grammar `to` clauses do not behave correctly, causing architecture-inappropriate packages and armhf build failures. Upstream craft-grammar#89 remains open.
71%