-
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Add jurigged hot reloading to debug extension #652
Conversation
Here is the code I used to test this. In |
Purely because of how much of a selling point this is, and how complex it is under the hood, can i suggest you make a guide for its usage? |
I'll get a PR open (or add a commit) to update the docs for the Debug cog to explain exactly what it is |
Is there any way to disable it? Depending on what I'm working on, I can foresee times when I would want the rest of DebugExtension, but juryrigged would cause invalid runtime states |
Not by default. I could add a flag to disable it. I didn't add that since the rest of the debug extensions didn't have that, either |
The rest of the debug extensions don't have any potential downsides of having them enabled ;) |
Any movement re the above comments @zevaryx? |
I had asked about where to put the documentation in the Discord and never got a response. I'm probably going to create a subsection of the docs explaining all of the debug extensiona |
The last discussion we had on discord was about moving it out of DebugExension, and making it a separate extension entirely |
Yes! I have those changes made locally, but was waiting for the conversations on documentation. Been busy at work these last few weeks, but I'll get the changes finished and pushed this week |
@@ -5,6 +5,9 @@ These files contain useful features that help you develop a bot | |||
- [Debug Extension](debug_ext) | |||
- An extension preloaded with a load of debugging utilities to help you find and fix bugs | |||
|
|||
- [Jurigged](jurigged) |
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.
This name means nothing to people who don't already know the library. I'd rather call it "Live Editing" or "Hot Reloading" or something similar.
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.
I think "Live Patching" is a better name
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.
However, for the API reference, keeping the jurigged
name should be fine; I'll update the other parts of the docs to reference it as Live Patching
What type of pull request is this?
Description
jurigged is a library that can be used to patch Python code in memory, allowing for users to edit their bots while it is running and have the changes sync in real time with no downtime. This PR adds to the DebugExtension to allow jurigged to run and modify the bot as it is running, including re-syncing any commands that need to be resynced.
Changes
Checklist
Python 3.10.x