Skip to content

Allow staging snap components #6095

@CarlosNihelton

Description

@CarlosNihelton

Check existing issues

  • I've verified that this request isn't described by any existing issues.

Request

It's already possible to use stage-snaps in a snapcraft.yaml to compose multiple snaps into a bigger one, or to dump the contents of a list of snaps into a ROCK (in the case of rockcraft.yaml).
It would be great if there was a similar way to stage snap components, either extending the syntax of stage-snaps to support constructs like snap+component or a more specific key stage-snap-components in which the items in the list follow the syntax (snap+component) (or a better UX you might find that I can't think of right now).

The problem it solves

Allowing this composition aligns the reuse of snaps and snaps components in a finer grained way when composing larger units of deployments, such as composite snaps or ROCKs.

I believe such feature should allow decoupling the component from the main snap. Although that could be somewhat surprising for folks used to snap download snap+component to acquire both, for snapcraft.yaml and other craft-related configurations, certain use cases might benefit from solely bringing the component, such as locale data that happens to be replicated in multiple snaps without having to source one of the main snaps in that case. An optional component in a snap might be a useful dependency of a composite snap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions