stack-ide-sublime icon indicating copy to clipboard operation
stack-ide-sublime copied to clipboard

It's now harder to hack on the pugin: existing ide-sessions no longer restart automatically

Open rvion opened this issue 10 years ago • 5 comments

Before recent updates, when I was changing the plugin source code, stack-ide sessions in other sublimetext instances were restarting on their own, picking my latest modifications. It was very convenient to hack on the editor, and change things.

Now, It's no longer the case, so it' much harder to tweak the plugin or test fixes. (the fix may be easy, but I'm not really familiar with python / subl hacking)

rvion avatar Oct 28 '15 14:10 rvion

ping @tomv564 @lukexi

rvion avatar Oct 28 '15 14:10 rvion

possibly related to https://github.com/lukexi/stack-ide-sublime/issues/29

rvion avatar Oct 28 '15 14:10 rvion

The restart command had no tests written against it either - I'll have a look at fixing it tonight!

tomv564 avatar Oct 28 '15 14:10 tomv564

Thanks for all the good work ! :+1:

I hope my bug reports do not seem negative. I really appreciate all the energy you're putting in this plugin !

rvion avatar Oct 28 '15 14:10 rvion

When we had all the code in 1 module, the whole plugin was conveniently restarted by Sublime's module reload. Now the plugin is broken up over several modules, I think the following is happening:

  1. Module A imports Module B.
  2. You save changes to Module B
  3. Sublime Text reloads Module B
  4. Module A keeps running with old version of Module B in memory.
  5. New Module B loads a fresh version of module A which is never initialised through plugin_loaded().

In other words, your plugin keeps running but the new stuff doesn't talk to the old stuff. The now-working SublimeStackIDE: Restart command may not help at all with this.

This thread discusses the problem: https://www.sublimetext.com/forum/viewtopic.php?f=6&t=6777 The solution mentioned by wbond can be seen here: https://github.com/jdivock/sublimesettings/blob/master/SVN/SVN.py

The tests are a way to get some quick iteration on a feature, but I agree that having the plugin reload itself (in the right order) is great for hacking away.

tomv564 avatar Oct 29 '15 00:10 tomv564