quinnj / Sublime-IJulia

An IJulia Frontend for Sublime Text 3
90 stars 16 forks source link

Restart Julia command fails #43

Closed drewrobson closed 10 years ago

drewrobson commented 10 years ago

This package has been mostly wonderful, but when I press control + shift + r to restart Julia, I just get a couple _Kernel Died_ messages. I am using Sublime 3.0 build 3059, Julia 0.3.0 build 1570, and Windows 7 x64.

The console tracebacks look informative:

Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublimeplugin.py", line 549, in run return self.run(edit) File "IJulia in C:\Users\jlidrob\AppData\Roaming\Sublime Text 3\Installed Packages\IJulia.sublime-package", line 253, in run File "IJulia in C:\Users\jlidrob\AppData\Roaming\Sublime Text 3\Installed Packages\IJulia.sublime-package", line 24, in restart TypeError: init() missing 1 required positional argument: 'cmd' Heartbeat didn't get a response Heartbeat didn't get a response Heartbeat didn't get a response Heartbeat didn't get a response Heartbeat didn't get a response Kernel died, closing sockets.... Sockets closed... Exception in thread Thread-1: Traceback (most recent call last): File "X/threading.py", line 639, in _bootstrap_inner File "Kernel in C:\Users\jlidrob\AppData\Roaming\Sublime Text 3\Installed Packages\IJulia.sublime-package", line 424, in run File "IJulia in C:\Users\jlidrob\AppData\Roaming\Sublime Text 3\Installed Packages\IJulia.sublime-package", line 82, in on_close File "IJulia in C:\Users\jlidrob\AppData\Roaming\Sublime Text 3\Installed Packages\IJulia.sublime-package", line 43, in remove_ijulia_view IndexError: list assignment index out of range

Thanks, Drew

quinnj commented 10 years ago

Yeah, that's why its undocumented ;) The restart functionality has always been pretty brittle. It seems like every time I fix it, it breaks down quickly with any other changes. I probably need to rethink how it really needs to work and come up with something more official and solid.

quinnj commented 10 years ago

Fixed in a new commit. The restart command now uses the recently added workspace() command so it's lightening fast!