-
-
Notifications
You must be signed in to change notification settings - Fork 409
reload: only act on python-file plugins
#2043
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
Conversation
And use the filtering feature in the `reload` plugin.
|
I thought a lot about that. If I agree that we need to limit the reload, somehow, to only single file plugins, I'm not convinced by the If you push the idea further, there are 2 facts:
As a result, I wonder if what we want is either to:
I know reloading is very tricky, and I'm really not happy with that feature. In particular, I'm always a bit annoyed that the only way to reload a plugin's configuration is to "reload" the plugin itself, which shouldn't be necessary. |
|
The big question, then, is whether you still think it's possible to make reloading work reasonably well for other plugin types after we start on 8.x dev and drop all Python versions <= 3.5 (or <= 3.6, since it's likely to go EOL in Dec 2021 before 8.0 is ready for release). It's been quite some time since we talked about it; the last substantive comment I could find in my IRC logs is from two years ago: I could scrap this approach and implement your idea from a year ago instead 😁: Tangent: Sopel 8 can go bonkers with a lot of stuff because of dropping old Pythons. Both reloading and asynchat are up for refactoring/replacement in 3.6, according to you-from-18-months-ago: For my part, I'm already tired just thinking about reviewing the gIanT PuLl rEquEStS you'll create 😅 😛 |
I'm still not sure about that part. In theory, yes, there are the tools available to do way more than before, but who knows how it will actually behave in the real world? However, I still think there is something to do that would still be useful: add a new hook (such as setup & shutdown), that would let the plugin itself to decide what to do on reload, with a default implementation just trying to reload the python file, in order to be backward compatible with today's version. Oh yeah, I'm so ready for these. 😁 |
|
We will worry about this in 8.0 and beyond. Reloading has been semi-broken ever since plugin types beyond single-file were introduced, well before either of us got involved with Sopel. It can stay so for another release series, at least. |
|
We've got other stuff about the plugin system to work on, like adding support for async. At this point I don't think it's worth spending any more time on reload logic, because future plans are likely to break it again. |
Description
Given the numerous issues with trying to live-reload plugins that live in namespace packages or entry-points, I have started on making the
reloadplugin act only on plugins that it's likely to successfully reload.The approach might be stupid. Or maybe it's brilliant. Possibly, nothing will make sense, since I wrote this in bits and pieces over several brief coding sessions spanning at least a week.
Checklist
make qa(runsmake qualityandmake test)Notes
Not exhaustively tested yet. I finished the last bit of stuff I wanted to write before opening a PR just before (actually just after) the checkout deadline for our hotel. 😁