-
Notifications
You must be signed in to change notification settings - Fork 263
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
Changes in a package without restarting the kernel #93
Comments
This is a limitation of gomacro interpreter, I will open an issue there |
Implemented upstream, see cosmos72/gomacro#15 @dwhitena, please consider updating the vendored copy of gomacro - and adding a gophernote magic command that invokes |
Hi @cosmos72 you are on fire lately! On the note of magics these are actually an ipython thing and not a jupyter thing. They are implemented in the ipython kernel and not part of the protocol/notebooks but rather at the language level and so they are still missing support. The approach to magics seems to be just a source->source transformation that just desugars any This is related to #65 so it might be best to continue over there. |
Thanks for the clarification @SpencerPark. That's actually good news: it means no changes are needed in the Jupyter <-> gophernotes messaging protocol - it's just a matter of recognizing such magics in the received source code, and executing them. Currently, gomacro uses the prefix But there is one more point: such special commands are not supported by So there are two steps to implement this feature:
|
Thanks for the update @cosmos72. I don't believe gomacro needs any updates as long as the function invoked with the The convention set with IPython's magics is that they are extensible and can be defined via user packages. I know IJulia uses Julia's own syntax for magics and there is a javascript kernel that uses Also going back to the first point we would most likely need the ability for users to define magics. With that in mind this introduces the need for a gophernotes runtime that is evaluated in the user space when the kernel is booted with some special values exposed to gomacro like the kernel/protocol functions. |
If I import a package and then make changes to a function in this package, these changes won't take any effect if I do not restart the kernel. Running the import again doesn't solve the issue, I need to restart the kernel, and re-run the imports.
The text was updated successfully, but these errors were encountered: