SublimErl
SublimErl copied to clipboard
Added Rebar build system
being totally unfamiliar with rebar on windows, may I ask what this is?
It is build system that will appear in the Tools > Build System menu. When selected you can use Tools > Build (Ctrl+B) to compile or invoke any of variant through Ctrl+Shift+B. You will see compiler output in console.
This is separate feature and has nothing to do Windows, other than it works on windows too.
I'm not sure about variants, I put those that I use, you can adjust or simplify if it is too much.
Currently SublimErl will actually compile all the project when you save a file. How does this differ?
I watched your introduction video again and it indeed does. May be on Windows it does not and therefore I had this problem, I will look into it.
Other than explicitly invoking get-deps, delete-deps, clean and possibly some other rebar commands, this is not different.
Ok thank you, I will review asap.
I got message from Andy, unable to find it anywhere, answering it here:
Hi Valery, I'm trying out your branch containing Windows & Rebar support as this is something that interests me. Where did you get rebar.cmd from? Is this a .cmd file you have written yourself or a Windows fork of Rebar? Code completion and indenting on Windows look OK so far, I can feed back any findings if you like ?
rebar.cmd -- I just cloned vanilla rebar from github and ran make on it (mingw32), it creates it automatically. I will get back to SublimErl this weekend.
Hi, apologies I must have removed my post some how when I tried to update it!
I see, I just ran bootstrap.bat on Windows and built from source so I have a working rebar.cmd now thanks. Having problems running the build from within Sublime though. I've tried explicitly pointing to my rebar.cmd file in the settings with no joy. For example ctrl+shift+b doesn't allow me to specify any targets and tries to run rebar compile although no output is generated. I'm new to sublime (looking for a good windows erlang editor) so I'm happy to help out with testing as i know erlang and rebar pretty well if I can help in anyway?
Make sure that you have rebar.cmd in your PATH variable. I just added whole cloned rebar folder to PATH and it worked.
Great thanks I've done that. I also had a problem that my .sublime-project file wasn't in the root of my Erlang project so the line "working_dir": "${project_path}" in Rebar.sublime-build meant that my rebar.config file wasn't been found. I recreated my sublime project in the root of my Erlang project and I can now run "rebar compile" using ctrl+b.... sweet! :-)
ctrl+shift+b still doesn't allow me to run any of the variants in Rebar.sublime-build but I'll look into that.
OK after reading a bit more of the docs, I can see the build variants are in the command palette(ctrl+shift+p) under "Build: get-deps" for example. Nice!
I have my .sublime-project near rebar.config, maybe that's why it works for me.
Yes thanks, that was exactly it, I moved my .sublime-project to the same directory as my rebar.config which solved the problem.