← Back to issue list

Support Snapcraft advanced grammar in plugin parameters?

View original Github issue

Metadata

Project
craft-application
Number
#985
Type
issue
State
open
Author
brlin-tw
Labels
Type: Enhancement
Created
Updated
Closed

Current evaluation

Feature request to support advanced grammar (on/to/else) in plugin parameters like cmake-parameters for arch-specific build flags. Triaged by maintainers in Jan 2026, confirmed valid but requiring extra work; no progress since.

Suggested action: keep open

Reason: The issue was properly triaged: lengau moved it to craft-application (where grammar is applied) and cmatsuoka confirmed on 2026-01-05 that 'plugin parameter handling will require some extra work to implement'. Code inspection confirms the limitation still exists at HEAD — process_part() skips keys not in the fixed get_grammar_aware_part_keywords() list, so dynamic plugin parameters remain unsupported. It is a valid, acknowledged enhancement with no reason to close, though ~8 months of inactivity warrants periodic re-prioritization.

Impact: 45 Quick Win: 15.75 Staleness: 65 Complexity: 65 Confidence: 80 Support Request: 10

Issue body

### What needs to get done Not exactly sure as the implementation of advanced grammar seems to be in the Snapcraft project, will that be reusable here? ### Why it needs to get done Hello, I would like to implement the following Snapcraft part definition: ```yaml parts: main: plugin: cmake cmake-parameters: - to armhf: - -DGGML_VULKAN=OFF - else: - -DGGML_VULKAN=ON ``` However this errors with: ```text $ snapcraft pack --debug Bad snapcraft.yaml content: - input should be a valid string (in field 'parts.main.cmake-parameters[10]') - input should be a valid string (in field 'parts.main.cmake-parameters[11]') ``` as (AFAICT) plugin parameters do not have advanced grammar support. This feature is especially helpful in Snapcraft as architecture-specific build configurations are quite common.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 15.75
Staleness: 65
Complexity: 65
Confidence: 80
Support Request: 10
keep open Feature request to support advanced grammar (on/to/else) in plugin parameters like cmake-parameters for arch-specific build flags. Triaged by maintainers in Jan 2026, confirmed valid but requiring extra work; no progress since.
qwen/qwen3.6-35b-a3b
Staleness: 60
Complexity: 45
Confidence: 85
Support Request: 10
keep open Request to enable Snapcraft advanced grammar for plugin parameters like cmake-parameters. Currently fails validation. Maintainers acknowledged the enhancement and moved it to craft-application for implementation review.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 40
Confidence: 90
Support Request: 5
keep open Request to add advanced grammar support to Snapcraft plugin parameters for architecture-specific build configs. Currently pending implementation work in craft-application.
qwen3.6-35b-a3b-mtp-q6
Staleness: 50
Complexity: 60
Confidence: 85
Support Request: 10
keep open Enable advanced grammar in Snapcraft plugin parameters for conditional, architecture-specific builds. Currently rejected by validation. Moved to craft-application; implementation requires additional work in parameter handling and remains under discussion.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#6064 (confidence 85%)

    Open snapcraft issue requesting advanced grammar for all snapcraft.yaml keys (including plugin params); its summary states it is cross-referenced to this craft-application issue, making it a broader superset of the same capability.

Related issues

Issue Project State Summary Similarity
#6064 Extend advanced grammer to all keys of snapcraft snapcraft open 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.
77%
#1831752 Missing grammar for conditional configflags on/to architecture snapcraft (launchpad) open Feature request to add per-architecture conditional grammar support for configflags in snapcraft parts, matching existing build-packages/stage-packages grammar. Open 7+ years with no labels, no maintainer response, and zero comments; unassessed.
72%
#1948465 Please add support for advanced grammar in stage snapcraft (launchpad) open Feature request to allow advanced grammar (try:/on $arch) in the stage directive, avoiding override-build workarounds. Open since 2020 with zero comments or labels; grammar support has since expanded to all part keywords, so applicability needs verification.
71%