rustyio / sync

On-the-fly recompiling and reloading in Erlang. Code without friction.
MIT License
748 stars 163 forks source link

Module could not be loaded #45

Closed mdg closed 9 years ago

mdg commented 9 years ago

I'm getting an error that Module could not be loaded. This happens even if I only add a comment to the file. I can shutdown the server and restart it and the file works fine. Any tips on how to further diagnose the problem?

I'm new to rebar so I suspect I've missed some important configuration in how I added sync to my application. Thanks!

Here is the output in the console when I change a file:

=ERROR REPORT==== 29-Sep-2014::09:08:52 ===
** Generic server sync_scanner terminating 
** Last message in was {'$gen_cast',compare_src_files}
** When Server state == {state,
                            [rechecks_sup,ranch_acceptor,ranch_acceptors_sup,
                             ranch_conns_sup,ranch_listener_sup,ranch_tcp,
                             ranch,cowboy,cowboy_router,rechecks_app,
                             cowboy_clock,cowboy_sup,cowboy_app,sync_options,
                             sync_utils,sync_scanner,sync,ranch_server,
                             ranch_sup,ranch_app,erts_internal,erlang,
                             erl_prim_loader,prim_zip,zlib,prim_file,
                             prim_inet,prim_eval,init,otp_ring0],
                            ["/home/mdg/src/rechecks/deps/cowboy/src",
                             "/home/mdg/src/rechecks/deps/ranch/src",
                             "/home/mdg/src/rechecks/deps/sync/src",
                             "/home/mdg/src/rechecks/src"],
                            ["/home/mdg/src/rechecks/deps/cowboy/src/cowboy.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_app.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_bstr.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_clock.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_handler.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_http.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_http_handler.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_loop_handler.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_middleware.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_protocol.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_req.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_rest.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_router.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_spdy.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_static.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_sub_protocol.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_sup.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_websocket.erl",
                             "/home/mdg/src/rechecks/deps/cowboy/src/cowboy_websocket_handler.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_acceptor.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_acceptors_sup.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_app.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_conns_sup.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_listener_sup.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_protocol.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_server.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_ssl.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_sup.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_tcp.erl",
                             "/home/mdg/src/rechecks/deps/ranch/src/ranch_transport.erl",
                             "/home/mdg/src/rechecks/deps/sync/src/sync.erl",
                             "/home/mdg/src/rechecks/deps/sync/src/sync_options.erl",
                             "/home/mdg/src/rechecks/deps/sync/src/sync_scanner.erl",
                             "/home/mdg/src/rechecks/deps/sync/src/sync_utils.erl",
                             "/home/mdg/src/rechecks/src/intro_handler.erl",
                             "/home/mdg/src/rechecks/src/login_prompt_handler.erl",
                             "/home/mdg/src/rechecks/src/main_handler.erl",
                             "/home/mdg/src/rechecks/src/rechecks_app.erl",
                             "/home/mdg/src/rechecks/src/rechecks_sup.erl"],
                            ["/home/mdg/src/rechecks/deps/cowboy/include",
                             "/home/mdg/src/rechecks/deps/ranch/include",
                             "/home/mdg/src/rechecks/include","include"],
                            [],
                            [{cowboy,{{2014,9,16},{0,34,11}}},
                             {cowboy_app,{{2014,9,16},{0,34,9}}},
                             {cowboy_clock,{{2014,9,16},{0,34,10}}},
                             {cowboy_router,{{2014,9,16},{0,34,11}}},
                             {cowboy_sup,{{2014,9,16},{0,34,12}}},
                             {erl_prim_loader,0},
                             {erlang,0},
                             {erts_internal,0},
                             {init,0},
                             {otp_ring0,0},
                             {prim_eval,0},
                             {prim_file,0},
                             {prim_inet,0},
                             {prim_zip,0},
                             {ranch,{{2014,9,16},{0,34,8}}},
                             {ranch_acceptor,{{2014,9,16},{0,34,8}}},
                             {ranch_acceptors_sup,{{2014,9,16},{0,34,8}}},
                             {ranch_app,{{2014,9,16},{0,34,8}}},
                             {ranch_conns_sup,{{2014,9,16},{0,34,8}}},
                             {ranch_listener_sup,{{2014,9,16},{0,34,8}}},
                             {ranch_server,{{2014,9,16},{0,34,8}}},
                             {ranch_sup,{{2014,9,16},{0,34,8}}},
                             {ranch_tcp,{{2014,9,16},{0,34,8}}},
                             {rechecks_app,{{2014,9,24},{10,0,44}}},
                             {rechecks_sup,{{2014,9,16},{0,31,27}}},
                             {sync,{{2014,9,27},{0,26,52}}},
                             {sync_options,{{2014,9,27},{0,26,52}}},
                             {sync_scanner,{{2014,9,27},{0,26,52}}},
                             {sync_utils,{{2014,9,27},{0,26,52}}},
                             {zlib,0}],
                            [{"/home/mdg/src/rechecks/deps/cowboy/src/cowboy.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_app.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_bstr.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_clock.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_handler.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_http.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_http_handler.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_loop_handler.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_middleware.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_protocol.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_req.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_rest.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_router.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_spdy.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_static.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_sub_protocol.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_sup.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_websocket.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/cowboy/src/cowboy_websocket_handler.erl",
                              {{2014,9,16},{0,33,50}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_acceptor.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_acceptors_sup.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_app.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_conns_sup.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_listener_sup.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_protocol.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_server.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_ssl.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_sup.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_tcp.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/ranch/src/ranch_transport.erl",
                              {{2014,9,16},{0,33,52}}},
                             {"/home/mdg/src/rechecks/deps/sync/src/sync.erl",
                              {{2014,9,27},{0,26,28}}},
                             {"/home/mdg/src/rechecks/deps/sync/src/sync_options.erl",
                              {{2014,9,27},{0,26,28}}},
                             {"/home/mdg/src/rechecks/deps/sync/src/sync_scanner.erl",
                              {{2014,9,27},{0,26,28}}},
                             {"/home/mdg/src/rechecks/deps/sync/src/sync_utils.erl",
                              {{2014,9,27},{0,26,28}}},
                             {"/home/mdg/src/rechecks/src/intro_handler.erl",
                              {{2014,9,29},{9,8,39}}},
                             {"/home/mdg/src/rechecks/src/login_prompt_handler.erl",
                              {{2014,9,16},{1,3,59}}},
                             {"/home/mdg/src/rechecks/src/main_handler.erl",
                              {{2014,9,16},{8,54,35}}},
                             {"/home/mdg/src/rechecks/src/rechecks_app.erl",
                              {{2014,9,24},{10,0,39}}},
                             {"/home/mdg/src/rechecks/src/rechecks_sup.erl",
                              {{2014,9,16},{0,31,14}}}],
                            [],
                            [{discover_modules,
                                 {1411996154592286,#Ref<0.0.0.7553>}},
                             {discover_src_dirs,
                                 {1411996154673218,#Ref<0.0.0.8284>}},
                             {discover_src_files,
                                 {1411996134609539,#Ref<0.0.0.8676>}},
                             {compare_beams,
                                 {1411996134618880,#Ref<0.0.0.8874>}},
                             {compare_src_files,
                                 {1411996132737579,#Ref<0.0.0.8841>}},
                             {compare_hrl_files,
                                 {1411996134619003,#Ref<0.0.0.8877>}}],
                            false,false}
** Reason for termination == 
** {'module could not be loaded',
       [{compile,file,
            ["/home/mdg/src/rechecks/src/intro_handler.erl",
             [binary,return,debug_info,warn_export_all,warn_export_vars,
              warn_obsolete_guard,warn_shadow_vars,warnings_as_errors,
              {dtl,false},
              {i,"/home/mdg/src/rechecks/include"},
              {outdir,
                  "/home/mdg/src/rechecks/_rel/rechecks_release/lib/rechecks-0.1.0/ebin"}]],
            []},
        {sync_scanner,recompile_src_file,2,
            [{file,"src/sync_scanner.erl"},{line,490}]},
        {sync_scanner,process_src_file_lastmod,3,
            [{file,"src/sync_scanner.erl"},{line,430}]},
        {sync_scanner,handle_cast,2,
            [{file,"src/sync_scanner.erl"},{line,243}]},
        {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,599}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
afrantisak commented 9 years ago

Questions:

choptastic commented 9 years ago

Is this happening with just this intro_handler file, or is it with every file?

The thing that stands out to me here is the combination of module could not be loaded and possibly the outdir.

This sounds like the compile module isn't loaded, or might not even be present.

What happens if you try to execute (from the erlang shell):

> compile:file("/home/mdg/src/rechecks/src/intro_handler.erl").

And if that works, try this:

> Opts = [binary,return,debug_info,warn_export_all,warn_export_vars,
              warn_obsolete_guard,warn_shadow_vars,warnings_as_errors,
              {dtl,false},
              {i,"/home/mdg/src/rechecks/include"},
              {outdir,
                  "/home/mdg/src/rechecks/_rel/rechecks_release/lib/rechecks-0.1.0/ebin"}].
> compile:file("/home/mdg/src/rechecks/src/intro_handler.erl", Opts).

I'm curious what happens here.

mdg commented 9 years ago

Here's a link to the project in dropbox. https://www.dropbox.com/s/lhnkry0deehjtcw/rechecks.tgz?dl=0

I created it with the cowboy initialization scripts, added a couple handlers and then tried to add sync. I start the app w/ _rel/rechecks_release/bin/rechecks_release console as indicated by the cowboy documentation I was following.

I've not tried the non_descendants feature, but this example is so simple, it doesn't seem like I should need it right?

This does seem to happen to every file I change. However, intro_handler.erl seems to fail even if I don't have it open and just let the app sit a few minutes.

The compile module does appear to be missing when I launch the app this way. However, if I just launch erl then the compile module is available. I'm not familiar enough w/ erlang to guess why that might be.

choptastic commented 9 years ago

Thanks for that. I believe I've found the culprit!

Try the newest version of sync I just pushed.

-Jesse

On Mon, Sep 29, 2014 at 8:55 PM, Matthew Graham notifications@github.com wrote:

Here's a link to the project in dropbox. https://www.dropbox.com/s/lhnkry0deehjtcw/rechecks.tgz?dl=0

I created it with the cowboy initialization scripts, added a couple handlers and then tried to add sync. I start the app w/ _rel/rechecks_release/bin/rechecks_release console as indicated by the cowboy documentation I was following.

I've not tried the non_descendants feature, but this example is so simple, it doesn't seem like I should need it right?

This does seem to happen to every file I change. However, intro_handler.erl seems to fail even if I don't have it open and just let the app sit a few minutes.

The compile module does appear to be missing when I launch the app this way. However, if I just launch erl then the compile module is available. I'm not familiar enough w/ erlang to guess why that might be.

— Reply to this email directly or view it on GitHub https://github.com/rustyio/sync/issues/45#issuecomment-57257072.

Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm

choptastic commented 9 years ago

Oh, and the problem, I believe, has to do with how relx creates its releases. In the case of sync, it needs the compiler application included in sync.app. So I added compiler and syntax_tools to it. I'm reasonably sure this will make it work.

mdg commented 9 years ago

Boom, that worked! Thanks!

I did get this error on the first edit but then it recompiles immediately and works fine after that.

=ERROR REPORT==== 1-Oct-2014::00:39:22 ===
/home/mdg/src/rechecks/src/intro_handler.erl:none: Error: no such file or directory

=INFO REPORT==== 1-Oct-2014::00:39:23 ===
/home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 1-Oct-2014::00:39:23 ===
intro_handler: Reloaded! (Beam changed.)

I also still get this error compiling a cowboy file once per run. That's not a file I'm changing and doesn't appear to interfere with development.

** Reason for termination == 
** {'module could not be loaded',
       [{epp_dodger,parse_file,
            ["/home/mdg/src/rechecks/deps/cowboy/src/cowboy.erl"],
            []},
        {sync_scanner,'-who_include/2-fun-0-',2,
            [{file,"src/sync_scanner.erl"},{line,621}]},
        {lists,'-filter/2-lc$^0/1-0-',2,[{file,"lists.erl"},{line,1284}]},
        {sync_scanner,process_hrl_file_lastmod,4,
            [{file,"src/sync_scanner.erl"},{line,608}]},
        {sync_scanner,handle_cast,2,
            [{file,"src/sync_scanner.erl"},{line,254}]},
        {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,599}]},
        {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
choptastic commented 9 years ago

Excellent!

The epp_dodger issue is caused by syntax_tools not being copied by relx. TO ensure syntax_tools gets copied, you're going to want to include it in your relx config in the 'release' section.

Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm On Sep 30, 2014 11:51 PM, "Matthew Graham" notifications@github.com wrote:

Boom, that worked! Thanks!

I did get this error on the first edit but then it recompiles immediately and works fine after that.

=ERROR REPORT==== 1-Oct-2014::00:39:22 === /home/mdg/src/rechecks/src/intro_handler.erl:none: Error: no such file or directory

=INFO REPORT==== 1-Oct-2014::00:39:23 === /home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 1-Oct-2014::00:39:23 === intro_handler: Reloaded! (Beam changed.)

I also still get this error compiling a cowboy file once per run. That's not a file I'm changing and doesn't appear to interfere with development.

* Reason for termination == * {'module could not be loaded', [{epp_dodger,parse_file, ["/home/mdg/src/rechecks/deps/cowboy/src/cowboy.erl"], []}, {sync_scanner,'-who_include/2-fun-0-',2, [{file,"src/sync_scanner.erl"},{line,621}]}, {lists,'-filter/2-lc$^0/1-0-',2,[{file,"lists.erl"},{line,1284}]}, {sync_scanner,process_hrl_file_lastmod,4, [{file,"src/sync_scanner.erl"},{line,608}]}, {sync_scanner,handle_cast,2, [{file,"src/sync_scanner.erl"},{line,254}]}, {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,599}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}

— Reply to this email directly or view it on GitHub https://github.com/rustyio/sync/issues/45#issuecomment-57418766.

choptastic commented 9 years ago

Okay, proper fix deployed. In the end, you need to update your relx file (it was my fault misunderstanding some of relx): https://github.com/rustyio/sync#sync-with-relx

mdg commented 9 years ago

Super, that epp_dodger error is now gone!

I'm still getting output that files are changing that I haven't changed. Here's what happens:

  1. I start the server and things look good
  2. I immediately change/save intro_handler.erl
  3. About 30 seconds pass
  4. I get output of files being recompiled: cowboy_protocol.erl, cow_http.erl, cow_http_hd.erl, cow_multipart.erl, intro_handler.erl even though I only changed the last one
  5. My change is visible when running the code
  6. Subsequent changes only report the file I changed as being recompiled

Output:

mdg@redbanana:~/src/rechecks$ _rel/rechecks_release/bin/rechecks_release consoleExec: /home/mdg/src/rechecks/_rel/rechecks_release/erts-6.1.2/bin/erlexec -boot /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/rechecks_release -env ERL_LIBS /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/lib -config /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/sys.config -args_file /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/vm.args -- console
Root: /home/mdg/src/rechecks/_rel/rechecks_release
/home/mdg/src/rechecks/_rel/rechecks_release
heart_beat_kill_pid = 22088
Erlang/OTP 17 [DEVELOPMENT] [erts-6.1.2] [source-8ad5bd0] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Starting Sync (Automatic Code Compiler / Reloader)
Scanning source files...
application:start(sync)
Eshell V6.1.2  (abort with ^G)
(rechecks@127.0.0.1)1> 
=INFO REPORT==== 5-Oct-2014::14:43:54 ===
/home/mdg/src/rechecks/deps/cowboy/src/cowboy_protocol.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:43:54 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_http.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:43:54 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_http_hd.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:43:55 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_multipart.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:43:55 ===
/home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:43:55 ===
cow_http_hd: Reloaded! (Beam changed.)

=INFO REPORT==== 5-Oct-2014::14:43:55 ===
cowboy_protocol: Reloaded! (Beam changed.)

=INFO REPORT==== 5-Oct-2014::14:43:55 ===
intro_handler: Reloaded! (Beam changed.)

=INFO REPORT==== 5-Oct-2014::14:45:18 ===
/home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:45:18 ===
intro_handler: Reloaded! (Beam changed.)
mdg commented 9 years ago

So that's what happens if I start the app and immediately change a file. If I start the app, then wait before changing a file, I get the following:

  1. Start app, things look fine
  2. Wait ~30 seconds
  3. Change intro_handler.erl
  4. Just intro_handler.erl is recompiled, things look fine
  5. Wait ~30 seconds and see that the same set of cowboy files are recompiled even though I didn't change them
  6. Change intro_handler.erl again, change is immediately picked up and recompiled

Output:

mdg@redbanana:~/src/rechecks$ _rel/rechecks_release/bin/rechecks_release consoleExec: /home/mdg/src/rechecks/_rel/rechecks_release/erts-6.1.2/bin/erlexec -boot /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/rechecks_release -env ERL_LIBS /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/lib -config /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/sys.config -args_file /home/mdg/src/rechecks/_rel/rechecks_release/releases/1/vm.args -- console
Root: /home/mdg/src/rechecks/_rel/rechecks_release
/home/mdg/src/rechecks/_rel/rechecks_release
heart_beat_kill_pid = 22409
Erlang/OTP 17 [DEVELOPMENT] [erts-6.1.2] [source-8ad5bd0] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Starting Sync (Automatic Code Compiler / Reloader)
Scanning source files...
application:start(sync)
Eshell V6.1.2  (abort with ^G)
(rechecks@127.0.0.1)1> 
=INFO REPORT==== 5-Oct-2014::14:54:33 ===
/home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:55:07 ===
/home/mdg/src/rechecks/deps/cowboy/src/cowboy_protocol.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:55:07 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_http.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:55:07 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_http_hd.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:55:08 ===
/home/mdg/src/rechecks/deps/cowlib/src/cow_multipart.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:55:08 ===
cow_http_hd: Reloaded! (Beam changed.)

=INFO REPORT==== 5-Oct-2014::14:55:08 ===
cowboy_protocol: Reloaded! (Beam changed.)

=INFO REPORT==== 5-Oct-2014::14:57:36 ===
/home/mdg/src/rechecks/src/intro_handler.erl:0: Recompiled.

=INFO REPORT==== 5-Oct-2014::14:57:36 ===
intro_handler: Reloaded! (Beam changed.)
mdg commented 9 years ago

Just to clarify again, I'm providing this feedback in case it helps you improve sync, but it's working well enough for me to use it now. Also, since it's those specific cowboy files, maybe it's cowboy related?

choptastic commented 9 years ago

I definitely appreciate it.

It's not a cowboy issue - I suspect there's something about the the relx release structure that's making sync think it needs to recompile the files when they're first loaded - I'd have to look into it more, experimenting with relx and sync.

-Jesse

On Sun, Oct 5, 2014 at 2:01 PM, Matthew Graham notifications@github.com wrote:

Just to clarify again, I'm providing this feedback in case it helps you improve sync, but it's working well enough for me to use it now. Also, since it's those specific cowboy files, maybe it's cowboy related?

— Reply to this email directly or view it on GitHub https://github.com/rustyio/sync/issues/45#issuecomment-57948075.

Jesse Gumm Owner, Sigma Star Systems 414.940.4866 || sigma-star.com || @jessegumm