Skip to content
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

sopel-plugins CLI doesn't show broken plugin source #2113

Closed
dgw opened this issue Jun 20, 2021 · 1 comment · Fixed by #2135
Closed

sopel-plugins CLI doesn't show broken plugin source #2113

dgw opened this issue Jun 20, 2021 · 1 comment · Fixed by #2135
Labels
Bug Things to squish; generally used for issues Medium Priority
Milestone

Comments

@dgw
Copy link
Member

dgw commented Jun 20, 2021

One of the main utilities our sopel-plugins CLI tool provides is showing what plugins are available, and where they come from (a file, a folder, a package). It works great for plugins that can load as valid Python modules, but shows only "unknown" for the source location if loading generates an error of any kind—meaning there is a mistake in the plugin code:

$ sopel-plugins list
...
broken/unknown Error: name 'bot' is not defined (unknown) [error]
...
$ sopel-plugins show broken
Plugin: broken
Status: error
Type: unknown
Source: unknown
Label: Error: name 'bot' is not defined
Loading failed

Ideally, even if loading fails, sopel-plugins would be able to at least show the type and source of a broken plugin so the user can easily go fix the problem and/or report it to the author.

This isn't just my random idea; it came from a long troubleshooting session on IRC yesterday, followed by @Exirel's later reflection that sopel-plugins list helped confirm that there existed a problem, but not where.

Note: My broken.py plugin file was literally one line, very easy to test.
bot.say("This can't ever work.")

@dgw dgw added Bug Things to squish; generally used for issues Medium Priority labels Jun 20, 2021
@dgw dgw added this to the 8.0.0 milestone Jun 20, 2021
@dgw dgw closed this as completed in #2135 Aug 3, 2021
@dgw dgw modified the milestones: 8.0.0, 7.1.3 Aug 4, 2021
@dgw
Copy link
Member Author

dgw commented Aug 4, 2021

We can in fact release this as part of 7.1.3, and so why not do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Things to squish; generally used for issues Medium Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant