canonical / canonical/craft-application
Support Snapcraft advanced grammar in plugin parameters?
- Dominant language
- Python
- Stars
- 14
- Forks
- 29
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 13
Description
### 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.
Contributor guide
Research direction
Start by comparing Snapcraft's advanced grammar implementation with how craft-application validates plugin parameters, using the example in the issue as the input case. Determine whether the grammar can be reused here; done means the conditional cmake-parameters YAML is accepted and architecture-specific values are handled correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100