[erlang-questions] Looking for slides of a lightning talk

David Cartt dcartt@REDACTED
Thu Jul 12 03:56:30 CEST 2012




> > 2) Find rebar is not available on windows.  OK. I'll upgrade a VM I have 
> > to Unbuntu 12:04. (which takes 3 hours, fails and needs nursing back to 
> > health.  After removing and re-installing some packages things are now 
> > OK, apart from the occasional crash.  Aside - virtual box provides a 
> > rather standard environment, so should not be a problem. And I though 
> > Linux was supposed not to crash like Windows. Not my experience.  Oh 
> > well - press on. 
>
> Cowboy isn't available on Windows either, AFAIK. None of my software has 
> been tested properly on Windows (or at least I didn't get feedback about 
> it). I think few open-source Erlang developers use Windows and unless 
> they send patches or finance some work towards this it's going to 
> improve very slowly. Not trying to make an apology of it, just 
> explaining the whys. 
>
>
A couple weeks ago I got Rebar and Cowboy working on Windows 7 and Cygwin. 
 It was difficult but only because I wasn't familiar with the process or 
Rebar, and I learned a lot of value along the way.  I had to make only one 
small change to a Rebar erl file and none to Cowboy.  It required some 
simple Makefile changes too, and some kludged copying of erl and beam files 
to get dependencies working without errors, but I'm sure that could be done 
properly by someone with more Erlang and Rebar knowledge.

I had to make only one source change, to Rebar, and that was to get the 
Cowboy tests (mostly) working.

"<" is my version, ">" is original.

$ diff rebar_ct.erl ../r/src
92,103c92,94
< Msg = case rebar_utils:sh("grep -e \"TEST COMPLETE\" -e 
\"{error,make_failed}\" \"" ++ RawLog ++ "\"", [{use_stdout, false}, 
return_on_error]) of
<               {ok, Msg1} -> Msg1;
<               {error, {1,[]}} -> ""
< end,
<
---
>     {ok, Msg} =
>         rebar_utils:sh("grep -e 'TEST COMPLETE' -e '{error,make_failed}' "
>                        ++ RawLog, [{use_stdout, false}]),


Test run results:

Name Ok Failed Skipped(User/Auto) Missing
Erlang.app-Cowboy.http_SUITE<file:///D:/misc/workspaces/Erlang/app-Cowboy/logs/ct_run.test@Stympy.2012-06-22_17.54.55/Erlang.app-Cowboy.http_SUITE.logs/run.2012-06-22_17.54.55/suite.log.html>67 7 4 (4/0) 0
Erlang.app-Cowboy.proper_SUITE<file:///D:/misc/workspaces/Erlang/app-Cowboy/logs/ct_run.test@Stympy.2012-06-22_17.54.55/Erlang.app-Cowboy.proper_SUITE.logs/run.2012-06-22_17.55.13/suite.log.html>1 0 0 (0/0) 0
Erlang.app-Cowboy.ws_SUITE<file:///D:/misc/workspaces/Erlang/app-Cowboy/logs/ct_run.test@Stympy.2012-06-22_17.54.55/Erlang.app-Cowboy.ws_SUITE.logs/run.2012-06-22_17.55.14/suite.log.html>7 0 0 (0/0) 0


Cowboy works great, but there is one thing not working for me in Windows. 
 The cowboy_http_static handler doesn't appear to be detecting file 
changes.  I'll change a .js file, refresh the web page, and Cowboy responds 
that the file is unchanged.  I'm using Etags ({attributes, [filepath, 
filesize, inode, mtime]}), the Etags are changing when the file changes, 
but Cowboy never seems to detect that change, according to its response to 
the browser.  



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120711/49f10b58/attachment.htm>


More information about the erlang-questions mailing list