← Back to issue list

many: simplify plugin loading

View original Github issue

Metadata

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

Current evaluation

Merged snapcraft#1507 in commit f8207335f, moving plugin loading from PluginHandler to PartsConfig to reduce indirection and component coupling.

Resolution: closed resolved

Reason: PR #1507 was approved and merged as commit f8207335f. PartsConfig now loads plugins and passes them to PluginHandler; grammar extraction was deferred to follow-up work.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Currently, loading a plugin goes through many layers of redirection, which is confusing and causes components to be integrated more tightly than would be ideal. This PR simplifies it by no longer loading plugins within PluginHandler, but rather accepting an already-loaded plugin. That plugin is then loaded in PartsConfig, where it is then handed to the PluginHandler. Beyond an improved design, this also gives us the ability to extract grammar processing completely from the PluginHandler, which will be done in a follow-up PR.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged snapcraft#1507 in commit f8207335f, moving plugin loading from PluginHandler to PartsConfig to reduce indirection and component coupling.
stealth/space-bunny-alpha — closed resolved Merged PR #1507 in commit f8207335f, moving plugin loading from PluginHandler to PartsConfig to reduce indirection, loosen coupling, and enable later grammar extraction.
stealth/space-bunny-alpha — closed resolved Merged PR #1507 in commit f8207335f, moving plugin loading from PluginHandler to PartsConfig to simplify initialization and decouple components; grammar extraction was left to a follow-up.
qwen/qwen3.6-35b-a3b — — Merged an architectural refactor that simplifies plugin loading by shifting initialization from PluginHandler to PartsConfig. Approved by one reviewer across 13 files, the change decouples components and enables future grammar processing extraction.
qwen3.6-35b-a3b-mtp-q6 — — Merged a refactor simplifying plugin loading by moving initialization from PluginHandler to PartsConfig. Plugins are now passed as pre-loaded instances, reducing coupling and enabling future grammar processing extraction.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1509 (confidence 95%)

    Merged follow-up in commit 82e27706d that moved stage-package grammar processing from pluginhandler to project_loader.

Related issues

Issue Project State Summary Similarity
#1596044 Parts loader needs refactoring snapcraft (launchpad) closed Parts configuration was refactored into a dedicated recursive loader by merged PR snapcore/snapcraft#731, commit a7b22b5d3.
72%