Skip to content

Plugin manager refactoring#3505

Merged
itowlson merged 1 commit into
spinframework:mainfrom
itowlson:plugin-manager-rework-to-jolly-well-manage
May 12, 2026
Merged

Plugin manager refactoring#3505
itowlson merged 1 commit into
spinframework:mainfrom
itowlson:plugin-manager-rework-to-jolly-well-manage

Conversation

@itowlson
Copy link
Copy Markdown
Collaborator

This emerged from prototyping on #3494. The original plugin code was fairly simple and well structured, but over time it has accreted a bunch of stuff that bypasses abstractions and entangles concerns, to the point where I was struggling to figure out how and where to add some stuff I needed.

This PR aims to restore a division of responsibilities between:

  • The Manager - the thing that applications interact with to list, install, remove, and execute plugins without needing to know internal implementation details
  • The Store - the thing that knows how to lay files out on disk
  • The Catalogue (new) - the snapshot of the remote spin-plugins repo - knows about available plugins and updating (although updating remains a slightly fuzzy responsibility, but that's not a huge concern for me)

I have made the store module private, so that application code is not tempted to perform logic directly against the disk layout: the manager should surface all that at a layer of abstraction that insulates the app from knowledge of JSON and directories and related nibbly bits.

I also did some minor renaming, and added some doc comments where I was struggling with names.

I don't imagine I've eliminated all the tangly bits, in fact I know some bits that still feel a bit of a lash-up (I think largely because of the badger), but for me this surfaces a clearer API to consumers of the crate. Feedback is, of course, welcome!

@itowlson itowlson force-pushed the plugin-manager-rework-to-jolly-well-manage branch 2 times, most recently from b074e08 to e8a4454 Compare May 12, 2026 02:08
Comment thread crates/plugins/src/catalogue.rs Outdated
Comment thread crates/plugins/src/catalogue.rs
Comment thread crates/plugins/src/manifest.rs Outdated
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson itowlson force-pushed the plugin-manager-rework-to-jolly-well-manage branch from e8a4454 to 12af98a Compare May 12, 2026 20:26
@itowlson itowlson requested a review from fibonacci1729 May 12, 2026 20:26
@itowlson itowlson enabled auto-merge May 12, 2026 20:36
@itowlson
Copy link
Copy Markdown
Collaborator Author

CI failure is due to an unrelated change in the JS SDK (spinframework/spin-js-sdk#506) so I will bypass.

@itowlson itowlson disabled auto-merge May 12, 2026 22:44
@itowlson itowlson merged commit bf54c5b into spinframework:main May 12, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants