Sublime Forum

Intermittent "no build system" error

#1

I have a custom build system for HTML & javascript files to check JS syntax.

"cmd": "sharplinter", "-ph","best","*.min.js", "$file"],
"file_regex": "^(.*?)\\(([0-9]+)\\): ()(.*)$",
"selector": "source.html|source.htm|source.js"

On one of my computers it works fine. On another one it works erratically. Both are Windows 7 64 bit. Sometimes it works, other times it gives me a ā€œno build system error.ā€ I canā€™t seem to make out any pattern for when it works and when it doesnā€™t. This is the latest build 2181. Any ideas?

By the way, I am not even sure if the syntax for ā€œselectorā€ is correct for multiple file extensions because it doesnā€™t seem to be documented, and even after much googling I couldnā€™t find an example. But this was what worked after trying a few different things. Perhaps this is part of the problem.

0 Likes

#2

Did you try comma separated selectors?

0 Likes

#3

Commas work too :smile: and so do spacesā€¦ Iā€™ll try for a while with commas just for the heck of it and see if it makes any difference.

Just played around a bit more, and closing & restaring sublime text solves the problem for a while. Then it starts happening again at some point. Seems like this could be a bug of some kind in which config information gets corrupted in memory. Though making changes to the build config file doesnā€™t fix things, even though the changes are recognized right away.

I am using one other package called sublimeOnSaveBuild which is just this:

class SublimeOnSaveBuild( sublime_plugin.EventListener ):
def on_post_save( self, view ):
settings = sublime.load_settings( ā€œSublimeOnSaveBuild.sublime-settingsā€ )
if re.search( settings.get( ā€œfilename_filterā€ ), view.file_name() ):
view.window().run_command( ā€œbuildā€ )

ā€¦ pretty simpleā€¦ so I donā€™t think itā€™s involvedā€¦

0 Likes

#4

Yeah I only say try the commas just because itā€™s how selectors are separated in completion and settings files.
I donā€™t know if selectors in build files can be comma separated also.

0 Likes