Plugin manager refactoring#3505
Merged
itowlson merged 1 commit intoMay 12, 2026
Merged
Conversation
b074e08 to
e8a4454
Compare
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
e8a4454 to
12af98a
Compare
fibonacci1729
approved these changes
May 12, 2026
Collaborator
Author
|
CI failure is due to an unrelated change in the JS SDK (spinframework/spin-js-sdk#506) so I will bypass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
spin-pluginsrepo - 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
storemodule 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!