<div dir="ltr">On a related note, has anyone written Common Test hooks to compile/reload the CUT modules before running tests? When I get back to Erlang, it's the top of my list, but I really wouldn't complain if it's been done already.<div>
<br></div><div style>Judson</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 1, 2013 at 12:01 PM, Diego Llarrull <span dir="ltr"><<a href="mailto:diego.llarrull@tecso.coop" target="_blank">diego.llarrull@tecso.coop</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I'm working on a riak_core based project, that is, one which uses rebar + GNU make and where the src files are located in different folders than the beam files, which are inside inside zipped (.ez) files.<br>
<br>
sync + libnotify will do the trick for unzipped files, but some extra trickery was needed to load the new .beam files<br>
<br>
a) compile the modified sources<br>
b) (create and) run a script that generates the .zip files containing the .beams and deploys those files in their destination directory<br>
c) run the following code:<br>
<br>
reload() -><br>
Modules = [ X || {X,L} <- code:all_loaded(), is_list(L),string:str(L, ?PATH_TO_CODE_DIR) =/= 0],<br>
lists:map(fun(X) -> c:l(X) end, Modules).<br>
<br>
Hope this helps anyone, right now I'm trying out ssync to see if it is able to handle zipped files.<br>
<br>
Best regards,<br>
<br>
Diego<div class="HOEnZb"><div class="h5"><br>
<br>
On 01/02/13 16:09, Serge Aleynikov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Scott,<br>
<br>
Nice to know I'm not the only one finding it useful! ;-)<br>
<br>
Other than for auto-compilation/loading of erlydtl templates, I also<br>
find that having control over the moment of code loading is more<br>
advantageous, as the function shows what modules were loaded, so you<br>
know what version of code is running.<br>
<br>
Concerning the user_default, I believe I added a couple more useful<br>
functions there (i.e tc/2, tc/4) after I published this module a while<br>
back. Enjoy! ;-)<br>
<br>
Serge<br>
<br>
On 2/1/2013 1:21 PM, Scott Lystig Fritchie wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Serge Aleynikov <<a href="mailto:serge@aleynikov.org" target="_blank">serge@aleynikov.org</a>> wrote:<br>
<br>
sa> [1] <a href="https://github.com/saleyn/util/blob/master/src/user_default.erl" target="_blank">https://github.com/saleyn/<u></u>util/blob/master/src/user_<u></u>default.erl</a><br>
<br>
Howdy, Serge. I've been using the l() function from that<br>
user_default.erl module for years. It's tremendously handy. There are<br>
times where I want to reload several modules after recompiling but load<br>
them sometime at my choosing rather than immediately after the compiler<br>
is done. l() does that.<br>
<br>
-Scott<br>
<br>
</blockquote>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>