← Back to issue list

extensions: refactor

View original Github issue

Metadata

Project
snapcraft
Number
#3781
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in snapcraft#3781 via commit 986a9895b (merge 52155ff01), centralizing extension checks in the base class to prevent future cyclic imports.

Resolution: closed resolved

Reason: PR #3781 was merged into main as merge commit 52155ff01. The approved refactor removed 191 lines while consolidating extension checks to avoid future cyclic import issues.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Avoid future cyclic import issues. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? ----- Part of https://github.com/snapcore/snapcraft/pull/3760 CRAFT-1114

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#3781 via commit 986a9895b (merge 52155ff01), centralizing extension checks in the base class to prevent future cyclic imports.
stealth/space-bunny-alpha — closed resolved Merged an extensions refactor to avoid future cyclic imports, centralizing checks in the base class. PR #3781 landed via commit 986a9895b and merge commit 52155ff01.
qwen/qwen3.6-35b-a3b — — Merged refactoring of extensions to prevent future cyclic import issues. Approved by reviewer, passed CI, and integrated into main. Reduced code by 163 lines across six files with a minor coverage decrease.
qwen3.6-35b-a3b-mtp-q6 — — Merged to main. Refactored extensions to prevent cyclic imports as part of PR #3760 and CRAFT-1114. Code coverage dropped 0.08% but the refactoring was successfully integrated.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#3760 (confidence 100%)

    PR #3781 was explicitly identified as part of the core22 GNOME extension work in #3760.

Related issues

Issue Project State Summary Similarity
#3679 Expand extensions snapcraft merged Merged PR snapcore/snapcraft#3679 via commit 07a8d695c, expanding extensions for CRAFT-948 in the snapcraft/7.0 branch.
76%
#2350 extensions: parse all declared extensions before applying snapcraft merged Merged in snapcore/snapcraft#2350 (commit 7e0391d40), parsing all declared extensions before applying any to fix LP #1797638.
76%
#2349 extensions: use extension docstring snapcraft merged Merged PR #2349 in commit 6e7e30ee1, making snapcraft extensions display extension-specific docstrings and resolving LP #1797655.
75%
#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.
75%
#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.
74%
#2347 extensions: support adding root properties snapcraft merged Merged PR #2347 as commit 482bffb1c, allowing extensions to add root-level snapcraft.yaml properties such as plugs and slots; resolves LP #1794531.
73%
#2355 extensions: cleanup and generic tests snapcraft merged Merged PR #2355 in commit 1c2a609a5, fixing LP #1791172 by making extensions properly installable and adding generic extension smoke tests.
73%
#2941 [WIP] extensions: add cleanup extension snapcraft closed Closed unmerged as maintainers shifted cleanup into core Snapcraft; merged PR snapcraft#3092 (ea9a58209) added core20 stage-package filtering using the base manifest.
72%
#292 extensions: add cli commands rockcraft merged Merged PR #292 (commit e8858077) added `list-extensions` and `expand-extensions` CLI commands with Snapcraft-equivalent semantics, plus test-data refactoring; closed rockcraft#274.
71%