-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement spin plugin list
#972
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor comments but this is great! I love how you implemented this to look similar with apt and make it clear the "status" of a plugin (compatible with host, compatible with Spin, installed, etc) and how easy it will be to add the different print styles in future if desired.
I think glossing over invalidly formatted plugins is okay. They shouldn't be able to be merged into the plugins repo as they would fail the json schema workflow. Something could get through but as you mention, it is likely not worth the syntactical disruption.
c27769b
to
7d40f0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a Rust fmt fix and this is good to go
Huh. |
OH IT'S A NEW CLIPPY THANKS FOR THE BREAKING CHANGE ON A MINOR VERSION RUST |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
7d40f0d
to
fb64b70
Compare
Fixes #937.
I'd really value comments on the structure of this - even more than usual, because I kind of felt that a bunch of this must already be in there but I wasn't sure where to find it. So please do flag up if logic is in the wrong places or are already done somewhere else.
The output with this code is loosely based on how
apt
looks on my WSL Ubuntu system, and looks like this:It could alternatively be printed in tabular format, and/or with colour highlighting, and/or with emoticons - the
PluginDescriptor
hopefully decouples the printing logic enough that this would be easy to fiddle with.At the moment, this glides silently over plugins that are in such a corrupted state that we can't even load them. This is preferable to being unable to list plugins at all just because one got mangled while I was trying to exit
vi
. It would be nice to print a warning if any were skipped, but it's a bit fiddly to do without losing the friendly?
syntax - I can have a noodle on it if people think it's worth it though.Signed-off-by: itowlson ivan.towlson@fermyon.com