← Back to issue list

extensions: parse all declared extensions before applying

View original Github issue

Metadata

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

Current evaluation

Merged in snapcore/snapcraft#2350 (commit 7e0391d40), parsing all declared extensions before applying any to fix LP #1797638.

Resolution: closed resolved

Reason: The approved change was merged as commit 7e0391d40. It records all app-to-extension relationships first, then applies extensions, preventing conflicts when multiple apps share an extension.

Evaluated by: mr-cal-bot

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 naively applied as they're discovered, which causes problems when multiple apps use the same extension. This PR fixes [LP: #1797638](https://bugs.launchpad.net/snapcraft/+bug/1797638) by parsing all declared extensions before applying any.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcore/snapcraft#2350 (commit 7e0391d40), parsing all declared extensions before applying any to fix LP #1797638.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#2350 via 7e0391d40, parsing all declared extensions before applying them so multiple apps can share an extension; fixes LP #1797638.
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#2350 (7e0391d40), fixing LP: #1797638 by parsing all declared extensions before applying them, avoiding conflicts when multiple apps share an extension.
qwen/qwen3.6-35b-a3b — — Merged to resolve LP: #1797638 by parsing all declared extensions before applying them, fixing conflicts when multiple apps share an extension. Approved, passed CI, and achieved 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for LP: #1797638 that parses all declared extensions before applying them. This resolves conflicts when multiple apps use the same extension. Authored by kyrofa, the change passed unit tests and achieved 100% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4110 extensions: parse snapcraft.yaml before expanding extensions snapcraft merged Merged #4110 (commit 51ca1524b): expand-extensions now parses snapcraft.yaml before expansion, fixing valid core22 files that use parse-info and advanced grammar keywords.
82%
#1797638 Extensions try to add parts multiple times snapcraft (launchpad) closed Fixed in snapcore/snapcraft#2350 (commit 7e0391d40) by parsing all declared extensions before applying them, preventing shared extensions from adding duplicate parts.
78%
#3781 extensions: refactor snapcraft merged Merged in snapcraft#3781 via commit 986a9895b (merge 52155ff01), centralizing extension checks in the base class to prevent future cyclic imports.
76%
#3679 Expand extensions snapcraft merged Merged PR snapcore/snapcraft#3679 via commit 07a8d695c, expanding extensions for CRAFT-948 in the snapcraft/7.0 branch.
73%
#2349 extensions: use extension docstring snapcraft merged Merged PR #2349 in commit 6e7e30ee1, making snapcraft extensions display extension-specific docstrings and resolving LP #1797655.
73%