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