bot, reload: log/show plugin source when reloading #1762
Merged
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 would have saved me a good half-hour of confusion tonight, by showing me that my bot was using an (outdated) plugin file in
.sopel/modules
that shadowed the built-in plugin fromsopel.modules.*
.I think the added
bot.get_plugin_meta()
function is helpful, and it was necessary to implement the output I wanted inreload
, but there could be a reason I haven't thought of that makes it a bad idea. Definitely tell me if so!Even just having the reloaded plugin's metadata in logs, and not on IRC, would have helped. I added it back to
reload
because 1) it used to show the file path before the plugin system rework, and 2) I like not having to check my terminal/log-files for things. 😛Note: I'm putting this in 7.0 because let's face it: a lot of people are going to make updates to their plugins for this release, to take advantage of new features and/or fix compatibility problems. We should make it easy for them to verify that the correct file/module is being loaded during development, even if
.reload
is still buggy for some plugin types.