Sublime Forum

Build system does not forward arguments to commands

#1

I am totally clueless as to how this happened, but basically the build system target commands (neitherexec nor my custom ones) do not receive any arguments anymore, which obviously results in all the builds failing or not even running.

With the addition of a run_ method to the default exec command

    def run_(self, *args, **kwargs):
        print(args)
        print(kwargs)
        super().run_(*args, **kwargs)

and then trying to run any build system (e.g. Java), I get the following output in the console:

(3, None)
{}
Traceback (most recent call last):
  File "C:\Users\Fichte\AppData\Roaming\Sublime Text 3\Packages\Default\exec.py", line 136, in run_
    super().run_(*args, **kwargs)
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 526, in run_
    return self.run()
  File "C:\Users\Fichte\AppData\Roaming\Sublime Text 3\Packages\Default\exec.py", line 189, in run
    print("Running " + " ".join(cmd))
TypeError

None should be a dict with all command parameters.

I checked with Edit Preferences and in console that I have in fact only one “exec” command installed, even though it does affect other build systems as well.

>>> import sublime_plugin
>>> [c(window) for c in sublime_plugin.window_command_classes if c(window).name() == "exec"]
<Default.exec.ExecCommand object at 0x0000000005B2DA20>]

Has anyone experienced something similar or happens to know a fix?

0 Likes

#2

By coincidence I found out that the problem was specific to a certain project and did not happen with any other, so I just deleted my workspace file (technically renamed) and fixed it with that.

Jon, if you are reading this and interested in the workspace I could anonimize and upload it but since I doubt this has occured to anyone else and doubt you’ll read this at all, I’ll spare my time for something more important and won’t act on my own.

0 Likes