Hi there,
I use a custom build script to build our product. It generally works great, except that it works intermittently: when I first start Sublime it usually works the first or second time, but as time goes on it works less and less. If I restart Sublime it goes back to working more frequently. By “works” I mean that the build runs, I can jump to the errors in the output window, etc.; by “doesn’t work” I mean that the build output window is cleared but then nothing is added to it (and the build process either never gets started or terminates immediately). There is no such problem running the build script from the command line. I am on the latest ST3 stable build on OS X, and with the most recent build the problem has gotten worse. I find it bizarre that the problem is intermittent; it’s rare that I encounter such a problem in Python unless there is some sort of uninitialized memory or variable in the underlying C++ code that backs a Python module. Here is the script:
import sublime, sublime_plugin, json
class FabricBuildCommand(sublime_plugin.WindowCommand):
def run(self, **kwargs):
if hasattr(self, 'text'):
text = self.text
else:
text = 'Debug klTests'
def runBuild(text):
self.text = text
return self.window.run_command('exec', {
"working_dir": kwargs["working_dir"],
"cmd": [
kwargs["working_dir"] + '/Util/SublimeBuild.sh',
kwargs["working_dir"]
] + text.split(' '),
"file_regex": kwargs["file_regex"],
}),
self.window.show_input_panel(
"Fabric Build:",
text,
runBuild,
lambda text: None,
lambda: None
)
Thanks for any suggestions anyone has on how I can debug this! I am definitely a ST3 scripting newbie.