nikitakit / hydrogen-python

Python-specific plugin for hydrogen. Make Python coding in the Atom editor even more interactive!
https://atom.io/packages/hydrogen-python
MIT License
54 stars 20 forks source link

Variable explorer dies when restarting kernel #4

Closed ediphy-azorab closed 6 years ago

ediphy-azorab commented 6 years ago

Reproduction steps:

define a variable (say x=1) cmd-shift-p -> hydrogen restart kernel

the variable explorer doesn't clear and won't detect new variables.

PS. Even at the PoC stage, this is an awesome tool, I'm very excited to see where it goes

nikitakit commented 6 years ago

Thanks for reporting!

I have a fix out now for the case where you restart the kernel from Atom.

There will still be an issue for remote kernels that restart on their own, but I think that should be sufficiently rare. It should only happen when a remote kernel crashes and is autorestarted, or if you initiate a restart from a different frontend (e.g. the notebook site). This shouldn't be very common, and the easy workaround for now is to either restart the kernel again from Atom, or to disconnect and then reconnect.