← Back to issue list

extensions: support adding root properties

View original Github issue

Metadata

Project
snapcraft
Number
#2347
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged: extensions can now add YAML snippets to the root of snapcraft.yaml, resolving LP: #1794531. Approved by a reviewer, passed CI with 100% diff coverage, and modified three files.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Currently, extensions are limited to adding YAML snippets to apps and parts, and adding new parts. In order to facilitate adding e.g. new plugs and slots, this PR resolves [LP: #1794531](https://bugs.launchpad.net/snapcraft/+bug/1794531) by adding the ability for extensions to also add YAML snippets to the root of the snapcraft.yaml.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged: extensions can now add YAML snippets to the root of snapcraft.yaml, resolving LP: #1794531. Approved by a reviewer, passed CI with 100% diff coverage, and modified three files.
qwen3.6-35b-a3b-mtp-q6 Merged. Extensions can now add YAML snippets to the root of snapcraft.yaml, resolving LP: #1794531. Previously limited to apps, parts, and new parts. Codecov reports 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged. Enables extensions to inject YAML snippets into the root of snapcraft.yaml, resolving LP #1794531. Passed static and unit tests with 100% diff coverage, allowing extensions to define new plugs and slots at the root level.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2348 extensions: remove root extensions snapcraft merged Merged removal of root extension declarations from snapcraft.yaml. Resolves LP #1797631 by deferring application scope decisions until usage patterns clarify. Approved by maintainer, passed CI, and modified two files.
78%
#292 extensions: add cli commands rockcraft merged Merged addition of list-extensions and expand-extensions CLI commands matching Snapcraft semantics, plus test refactoring. Resolves #274. Approved by two reviewers, passed CI, and modified 15 files (+452/-109 lines).
74%
#1794531 Extensions need ability to alter root properties snapcraft (launchpad) closed Closed without resolution. The feature request to allow extensions to modify snapcraft.yaml root properties was abandoned due to lack of discussion or implementation.
73%
#4110 extensions: parse snapcraft.yaml before expanding extensions snapcraft merged Merged fix for the expand-extensions command to parse snapcraft.yaml before expanding extensions. Resolves core22 parsing issues with parse-info and advanced grammar keywords. Approved, passed CI, and merged into main.
73%
#2349 extensions: use extension docstring snapcraft merged Merged into master. Replaces the generic snapcraft extension description with extension-specific docstrings, resolving bug LP: #1797655. Approved by reviewer and passed all CI checks.
71%