Skip to content

Support Snapcraft advanced grammar in plugin parameters? #985

@brlin-tw

Description

@brlin-tw

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:

parts:
  main:
    plugin: cmake
    cmake-parameters:
      - to armhf:
          - -DGGML_VULKAN=OFF
      - else:
          - -DGGML_VULKAN=ON

However this errors with:

$ 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions