Swift-Sublime-Package icon indicating copy to clipboard operation
Swift-Sublime-Package copied to clipboard

Build System

Open mtrovilho opened this issue 11 years ago • 3 comments

Hi, I've created a build system but the swift path is hard coded. I couldn't find a way to make it read my $path.

I followed your folder structure but don't know if this will work when installing from package manager.

If you like I can send a PR. https://github.com/mtrovilho/Swift-Sublime-Package/commit/d27a497ce15ed227fdd8efb16c09cfc1ce9d72a8


Usage:

cmd + b: Build
cmd + shift + b: Build and Run

mtrovilho avatar Jun 16 '14 18:06 mtrovilho

Hey thanks for getting started on this. I figured out how to do it without hard-coding the swift path, and I'll push the changes soon

quiqueg avatar Jul 01 '14 06:07 quiqueg

Great! Thank you.

mtrovilho avatar Jul 01 '14 16:07 mtrovilho

Dunno if you have a good file_regex in there, but this works for me

"file_regex": "^(...*?):([0-9]*):?([0-9]*)?:? (.*)$"

which prints e.g. error: variable used within its own initial value in the status line, and correctly jumps from line to line in the source file. It seems to continue matching into ST's own output after swift's errors, which I don't have the regex-fu to fix, but as long as one stops F4-ing after the last actual swift error...

tildebyte avatar May 12 '15 20:05 tildebyte