rustyio / sync Goto Github PK
View Code? Open in Web Editor NEWOn-the-fly recompiling and reloading in Erlang. Code without friction.
License: MIT License
On-the-fly recompiling and reloading in Erlang. Code without friction.
License: MIT License
Hi!
While working on a nitrogen project with some subdirectories for code I noticed that sync is not able to pickup module changes after compilation and thus fails to reload those modules.
I digged a little and could pin it down to a call to "transform_options" which sets up output dirs for the compiled sources.
Why is this needed? Why not reuse dir info given by code:get_object_code calls? In what situations would that path not be appropriate?
Anyways, thanks again for creating Sync!
Cheers
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}]}]}
I have sync falling into infinity loop somehow.
it moves to
sys:get_state(sync_scanner).
returns with timeout, while
sys:get_state(sync_scanner, infinity).
hangs forever.
Actually I don't know how to provide more info while i cant get any information from sys
module
I have a project importing a lot of projects. So, I wanted sync
to scan a subset of directories. So, I made my sys.conf like this:
{sync, [
{src_dirs, {replace, [
{"/Users/vdasari/Developer/foo/_build/default/lib/foo/src", [{outdir,"./_build/default/lib/foo/ebin"}]}
]}}
]}
I am using lager
for logging purposes which uses lager_transform and hence compile time options for my files is quite different. rebar3
is able to figure out all the options properly. But, for sync
it expects me to specify all the options for compiling my foo/src
.
It would be good if sync
can figure out compile-time options as well so that my sys.conf could look like this.
{sync, [
{src_dirs, {replace, [
{"foo/src", []}
]}}
]}
I'm having a release generated with Relx's dev mode (app folders in release/lib
are just folders linked to apps/
, e.g. release/lib/$APP-1.0
is a link to apps/$APP
). Sync cannot reload changed source files and beam files that are changed in the original folder.
What works:
$RELEASE/lib/$APP/ebin/module.beam
What doesn't work:
apps/$APP/ebin/module.beam
release/lib/$APP/src/module.erl
apps/$APP/src/module.erl
Today I found really weird issue - I watched some code in erlang.erl
and looks like system updated its access time, sync reloaded it and I found apply function going to infinitive loop on each call, because apply is defined there as
apply(Mod, Name, Args) ->
erlang:apply(Mod, Name, Args).
I'm not sure how to fix this, there could be more modules working is same way, and when they are reloaded by sync in background such mysterious things will happen.
I'm using sync and elixir in an erlang.mk based project. Elixir declared as dependency and lives in ./deps
. Shortly after start Sync enters infinite loop constantly recompiling elixir sources.
Execution flow in maybe_recompile_src_file
goes straight to _ ->
case branch because Module in case of Elixir files is always 'filename.ex' while by Elixir convention modules named as Elixir.<module name from defmodule>
. If I understand correrctly the idea behind sync is that you can infer module name from erl file because files usually named after modules. Maybe in Elixir case things are different.
Or maybe I'm just missing something :-)
First - after beam is loaded inside process_beam_lastmod, second time - when process_beam_lastmod is finished. Could it be fixed to show only one message?
btw console message prints only once.
The latest changes is not compatible with Rebar 2 (rebar 2.1.0 and Erlang 19).
==> sync (compile)
ERROR: compile failed while processing ./deps/sync: {'EXIT',{badarg,[{io,format,
[<0.49.0>,"Dependency not available: ~p-~s (~p)\n",
[fs,
{git,"https://github.com/synrc/fs",{tag,"6.1"}},
undefined]],
[]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{rebar_deps,do_check_deps,1,
[{file,"src/rebar_deps.erl"},{line,157}]},
{rebar_deps,compile,2,
[{file,"src/rebar_deps.erl"},{line,127}]},
{rebar_core,run_modules,4,
[{file,"src/rebar_core.erl"},{line,445}]},
{rebar_core,execute,5,
[{file,"src/rebar_core.erl"},{line,371}]},
{rebar_core,process_dir1,6,
[{file,"src/rebar_core.erl"},{line,235}]},
{rebar_core,process_each,5,
[{file,"src/rebar_core.erl"},{line,305}]}]}}
make: *** [compile] Error 1
What am I doing wrong?
$ echo $ERL_LIBS
/home/hernanex3/.ERL_LIBS/
$ pwd
/home/hernanex3/.ERL_LIBS
$ git clone [email protected]:rustyio/sync.git
Cloning into 'sync'...
remote: Counting objects: 708, done.
remote: Total 708 (delta 0), reused 0 (delta 0), pack-reused 708
Receiving objects: 100% (708/708), 288.56 KiB | 552.00 KiB/s, done.
Resolving deltas: 100% (441/441), done.
$ cd sync/
$ make
./rebar compile
==> sync (compile)
Compiled src/sync.erl
Compiled src/sync_options.erl
Compiled src/sync_notify.erl
src/sync_utils.erl:16: Warning: export_all flag enabled - all functions will be exported
Makefile:2: recipe for target 'compile' failed
make: *** [compile] Error 1
$ erl
Erlang/OTP 20 [erts-9.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [kernel-poll:false]
Eshell V9.0.4 (abort with ^G)
1> sync:start().
{error,{"no such file or directory","sync.app"}}
it`s very useful to trigger code_change function after recompiling runing services.
Hi,
I'm using a sync module to automatically compile and update modules in Nitrogen.
Recently I started to use a parse_trans, namely annotations and memoize.
The problem is that sync compiles modules that are annotated without applying the parse_trans.
Only rebar compile does the correct thing.
Any advice on how to have sync doing what rebar does?
I use sync in env. OTP v.15... and all be good.
In env OTP v.17 - sync work very slow or not work, somtimes sync recompile changed files, somtimes no.
And in otp v.15 after start sync - it recompiles all sources.
in otp v.17 after start sync dono do this.
Line 69 in f13e61a
It should be ImagePath = filename:join([filename:dirname(code:which(sync)), "..", "priv", "icons", Image]) ++ ".png"
Sorry, wrong repo. Can this be deleted?
I have an annoying issue when working over fuse/sshfs where (I think) sync sees that a file has changed but the contents have not yet been written to the file; a race condition of sorts. Specifically I see this error:
13:23:33.230 [info] /path/to/module.erl:1: Error: no module definition
Usually re-saving the file will trigger a successful compile. I can see one of two paths for remediation:
I realize that the issue is probably particular to my setup and absolutely understand if you don't want to clutter up code dealing with this; however, if one of these approaches is acceptable, I'd be happy to submit a pull request.
Thanks! And thanks a ton for sync, it's a great utility.
code:which(Module)
return archive file path (for example: "/app-1.0.ez/app-1.0/ebin/my_mod.beam"
).
I think that the module should be loaded into the memory if failure to write by any reason.
Currently sync
polls directories and files for any changes and recompile the changed files and loads them. When sync
starts monitoring more projects under one umbrella CPU can get overwhelmed with this polling. it will be good if sync
looks for file system changes notifications and act upon them.
There is a project synrc/fs which provides filesystem change events. This supports Mac, Windows and Linux platforms. It would be good to integrate with this.
(First of all... thanks for sync
, it is absolutely awesome!)
In order to use sync as dependency it is necessary to either specify the revision as master
or a specific commit's SHA, but it would be a lot nicer to be able to specify a release/version number.
On some nitrogren installations it is working fine but others it has completely failed to locate the .hrl files in the include directory!
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:151: Warning: variable 'M' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:157: Warning: variable 'Count' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:159: Warning: variable 'Count' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:159: Warning: variable 'Node' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:164: Warning: variable 'Other' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:185: Warning: variable 'NodeNum' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:185: Warning: variable 'Pid' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:225: Warning: variable 'Count' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:225: Warning: variable 'Node' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/distr_startup_SUITE.erl:0: Recompiled with 1 warnings
10:02:59.974 [error] /mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/mnesia_power_SUITE.erl:52: Warning: variable 'Pid1a' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/mnesia_power_SUITE.erl:53: Warning: variable 'Pid1b' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/mnesia_power_SUITE.erl:54: Warning: variable 'Pid1c' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/mnesia_power_SUITE.erl:116: Warning: variable 'N' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/mnesia_power_SUITE.erl:0: Recompiled with 1 warnings
10:03:00.086 [error] /mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/random_kill_SUITE.erl:34: Warning: variable 'Config' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/random_kill_SUITE.erl:57: Warning: variable 'Ch' is unused
/mnt/hgfs/workspace/software/otp_src_R16B03-1/lib/test_server/src/things/random_kill_SUITE.erl:0: Recompiled with 1 warnings
as above ,when system start,sync will start to recompile the erlang lib .
Hex.pm says MIT but I don't see any license here, can someone clarify
After commit 4e2a1a9 with message "Give a useful error message if unable to fix descendants".
11:20:03.989 [error] Sync: Unable to fix the source path
Module user_default("/Users/federico/user_default.erl")
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.989 [error] Sync: Unable to fix the source path
Module erts_internal([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.990 [error] Sync: Unable to fix the source path
Module erlang([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.990 [error] Sync: Unable to fix the source path
Module erl_prim_loader([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.990 [error] Sync: Unable to fix the source path
Module prim_zip([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.991 [error] Sync: Unable to fix the source path
Module zlib([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.991 [error] Sync: Unable to fix the source path
Module prim_file([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.991 [error] Sync: Unable to fix the source path
Module prim_inet([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
(erlskeletor_cowboy@localhost)1> 11:20:03.991 [error] Sync: Unable to fix the source path
Module prim_eval([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.991 [error] Sync: Unable to fix the source path
Module init([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
11:20:03.992 [error] Sync: Unable to fix the source path
Module otp_ring0([])
Current Working Dir: "/home/pyotrgalois/projects/erlskeletor-cowboy"
Suggestion: It's possible you want to set the fix_descendants setting in sync.config to 'allow'. Not fixing.
I did not move the application or did anything special. You can check it by yourself cloning erlskeletor-cowboy (https://github.com/pyotrgalois/erlskeletor_cowboy) and executing make to get the deps and then make shell to run the system and to see the error.
Hey Rusty,
I'm popping this in here in case you have any ideas, but I'm putting this in here first while I work on a solution.
Anyway, when moving a release (particularly a nitrogen release, I haven't tried a non-nitrogen release) to another directory, sync will fail to recompile changes to files at least until all sources are cleaned and remade from that new path.
This is due to the original src path stored in the beam, and sync relying on that.
I'm working on a solution for this for the time being, but if you (or anyone else for that matter) have any ideas or forks that solve this problem, I'm all ears.
Thanks, hope things are good,
-Jesse
Environment: rebar3 based project.
Bug: Include directories are not populated properly and hence resulting in compilation failures when the modules are recompiled.
Enabled sync on project based on cowboy. On modifying cow_http.erl in that project I see this failure.
00:20:11.480 [error] /Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src/cow_http.erl:35: Error: can't find include file "cow_inline.hrl"
/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src/cow_http.erl:120: Error: function parse_hd_name/3 undefined
/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src/cow_http.erl:127: Error: undefined macro 'LOWER/4'
.
.
Tracked down the cause of this problem. Found that it is because include directories are not populated properly in API sync_utils:get_options_from_module(cow_http)
.
1> cow_http:module_info(compile).
[{options,[debug_info,
{i,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src"},
{i,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/include"},
{i,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib"}]},
{version,"7.1.3"},
{source,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src/cow_http.erl"}]
As you can see here include list not populated correctly here(it is incomplete)
2> sync_utils:get_options_from_module(cow_http).
{ok,[{i,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/src"},
{type,erl},
{outdir,"/Users/vdasari/Developer/erlang-gobgp/_build/default/lib/cowlib/ebin"},
debug_info]}
When using erlydtl in one of my projects, I receive the following crash log when I want to run sync:start().
:
=ERROR REPORT==== 9-Mar-2015::11:27:18 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[repos_dtl, …list of modules…],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1425911268005403,#Ref<0.0.0.608>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,720}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,730}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
It all boils down to this line where undefined
is returned instead of {ok, []}
I have a custom erlang build based on R15B02. I'm seeing two problems when building a cowboy app:
https://gist.github.com/4137279
...
I continued playing with this and lo, my cowboy files are recompiling!
This is so cool!
Thanks for the tooling tips at; http://www.slideshare.net/rklophaus/winning-the-edit-build-test-cycle
-Todd
Everytime you try to compile a dtl template, if you're using erlydtl 0.10.0 or above, you'll get the following warning:
Warning: Compile option 'outdir' has been deprecated. Use 'out_dir' instead.
To avoid that, sync should use out_dir
instead (at least for erlydtl_compile
).
I have a terrible hack involving linking folders, but I was wondering if there is a nice way to do this.
I tryed use sync:patch on two nodes.
I change some source code on one node, and compiled code updates on first node, after on second node, next first node update code, next secnod node update code... I wait about 10 minutes and this loop wont stop.
FIRST NODE
???/src/servers/dbs.erl:0: Recompiled with 1 warnings
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:17 UTC ===
Reloading 'dbs' on root@s2.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:17 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
Reloading 'dbs' on root@s2.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
Reloading 'dbs' on root@s2.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s2.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s2.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
Reloading 'dbs' on root@s2.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
a
SECOND NODE
(root@s2.?.com)2> [sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:18 UTC ===
Reloading 'dbs' on root@s1.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:18 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
Reloading 'dbs' on root@s1.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:20 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
Reloading 'dbs' on root@s1.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:22 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
[sync_scanner:376] DEBUG - Nodes: ['root@s1.?.com']
[sync_scanner:381] DEBUG - Node: 'root@s1.?.com'
=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
Reloading 'dbs' on root@s1.?.com.
=INFO REPORT==== 2-Jul-2014::19:47:24 UTC ===
dbs: Reloaded on 1 nodes! (Beam changed.)
{nodedown,'root@s1.?.com'}
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
a
hello,i like this project very much! I use it a lot! But sometimes it's not efficient, So I rewrote it and it's more efficient and also multi-platform and easy way to build and use . if you have interest, i want push to this project, But I made a lot of changes. for more information, you can look the link:
https://github.com/SisMaker/erlSync
https://github.com/SisMaker/erlSync21.2--
https://github.com/SisMaker/fileSync
I will update to last version of Sync 22/03/2014, but ErlyDtl templates don`t recompiles after changes.
Do you have this working on a rebar3 compiled project? I'm seeing some issues with this where it can't find the source files.
Am using sync in nitrogen with OTP 19, it works well but am failing to get desktop notifications and I have to go to the console each-time to see success / warning / failure notifications. I've the latest version of libnotify4
and I can send custom notifications from the terminal to the desktop such as notify-send "Error!"
and it works just fine. Even tried out Troubleshooting Growl Notifications all in vain. Here's my sync.config
file.
[
{sync,[
%% growl: Desktop notifications
%% valid values: all | none | [success | warning | error]
%% default: all
{growl, all},
%% log: Console notifications
%% valid values: all | none | [success | warnings | errors]
%% default: all
{log, all},
%% non_descendant: How to handle beams whose original source path is
%% not a descendant of the current working directory.
%%
%% valid values: fix | allow | ignore
%% * fix = attempt to find source files under current directory
%% * allow = don't do anything special, use the non-descendant path and
%% watch that file
%% * ignore = don't watch that module at all and ignore any changes to
%% its source path
%% default: fix
{non_descendant, fix},
%% excluded_modules: Ignore any modules listed
%% default: []
{excluded_modules, []},
%% executable: Identify the program that you want run by the "growl" notifications
%% valid values: auto | notifu | 'notify-send' | growlnotify | emacsclient
%% * auto = allow sync to autodetect which program to run
%% * growlnotify = Use Growl for Mac
%% * 'notify-send' = Use libnotify for Linux
%% * notifu = The notifu program for Windows
%% * emacsclient = Emacs notifications
%% default: auto
{executable, 'notify-send'}
]}
].
{non_descendant, fix}
should be "non_descendants"
Really like sync. I am also using EDTS for Emacs, and I think there are some strange interactions.
The core issue is
sync_scanner:start_link() at <0.163.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
i.e. the beam file is missing. Most likely, it is recompiled by "someone else".
I tried making a simple patch to wait 1000ms and retry, but didn't solve. it.
Most often, the failure is recovered, but sometimes, it takes the erlang down, as seen below.
([email protected])1> Scanning source files...
([email protected])1> 10:45:29.797 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:29.797 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:29.798 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.163.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> Scanning source files...
([email protected])1> 10:45:30.163 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:30.164 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:30.164 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1657.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> Scanning source files...
([email protected])1> 10:45:30.501 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:30.501 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:30.502 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1668.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> Scanning source files...
([email protected])1> 10:45:30.835 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:30.835 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:30.835 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1679.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> Scanning source files...
([email protected])1> 10:45:31.330 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:31.338 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:31.338 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1692.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> 10:45:31.965 [error] gen_server sync_scanner terminated with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500
([email protected])1> 10:45:31.967 [error] CRASH REPORT Process sync_scanner with 0 neighbours exited with reason: no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in gen_server:terminate/7 line 804
([email protected])1> 10:45:31.968 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1703.0> exit with reason no case clause matching {error,nofile} in sync_scanner:reload_if_necessary/7 line 500 in context child_terminated
([email protected])1> 10:45:31.969 [error] Supervisor sync had child sync_scanner started with sync_scanner:start_link() at <0.1703.0> exit with reason reached_max_restart_intensity in context shutdown
([email protected])1> 10:45:31.969 [info] Application sync exited with reason: shutdown
([email protected])1> 10:45:31.969 [error] Supervisor share3_sup had child share3 started with share3:start() at <0.156.0> exit with reason noproc in context shutdown_error
([email protected])1>
=INFO REPORT==== 8-May-2015::10:45:32 ===
stop_ready([], <0.173.0>)
([email protected])1>
=INFO REPORT==== 8-May-2015::10:45:32 ===
stop_ready([{{1431,74730,66399},<0.175.0>}], <0.440.0>)
([email protected])1> {"Kernel pid terminated",application_controller,"{application_terminated,sync,shutdown}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_terminated,sync,shutdown})
mattias@ubuntu:~$
Hello.
Sync crashes when a cowboy handler with erlydtl is run.
I made a repo to make it easier to reproduce: https://github.com/koddo/tmp-erlydtl-sync-crash-test
From it's readme:
There are two handlers: http://localhost:8080/with_erlydtl and http://localhost:8080/without_erlydtl
When the one with erlydtl is run, the sync crashes the node.
error report:
([email protected])1>
([email protected])1>
([email protected])1>
([email protected])1> Scanning source files...
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
["/Users/alex/tmp/hello_world/src"],
["/Users/alex/tmp/hello_world/src/hello_world_app.erl",
"/Users/alex/tmp/hello_world/src/hello_world_sup.erl",
"/Users/alex/tmp/hello_world/src/with_erlydtl.erl",
"/Users/alex/tmp/hello_world/src/without_erlydtl.erl"],
["/Users/alex/tmp/hello_world/include"],
[],
[{cowboy,{{2015,5,29},{15,33,33}}},
{cowboy_app,{{2015,5,29},{15,33,33}}},
{cowboy_clock,{{2015,5,29},{15,33,33}}},
{cowboy_router,{{2015,5,29},{15,33,34}}},
{cowboy_sup,{{2015,5,29},{15,33,34}}},
{erl_prim_loader,0},
{erlang,0},
{erts_internal,0},
{hello_world_app,{{2015,5,29},{19,9,53}}},
{hello_world_sup,{{2015,5,29},{15,33,35}}},
{init,0},
{otp_ring0,0},
{prim_eval,0},
{prim_file,0},
{prim_inet,0},
{prim_zip,0},
{ranch,{{2015,5,29},{15,33,32}}},
{ranch_acceptor,{{2015,5,29},{15,33,32}}},
{ranch_acceptors_sup,{{2015,5,29},{15,33,32}}},
{ranch_app,{{2015,5,29},{15,33,32}}},
{ranch_conns_sup,{{2015,5,29},{15,33,32}}},
{ranch_listener_sup,{{2015,5,29},{15,33,32}}},
{ranch_server,{{2015,5,29},{15,33,33}}},
{ranch_sup,{{2015,5,29},{15,33,33}}},
{ranch_tcp,{{2015,5,29},{15,33,33}}},
{sync,{{2015,5,29},{16,36,17}}},
{sync_notify,{{2015,5,29},{16,36,17}}},
{sync_options,{{2015,5,29},{16,36,17}}},
{sync_scanner,{{2015,5,29},{16,36,17}}},
{sync_utils,{{2015,5,29},{16,36,17}}},
{zlib,0}],
[{"/Users/alex/tmp/hello_world/src/hello_world_app.erl",
{{2015,5,29},{19,7,38}}},
{"/Users/alex/tmp/hello_world/src/hello_world_sup.erl",
{{2015,5,29},{15,32,3}}},
{"/Users/alex/tmp/hello_world/src/with_erlydtl.erl",
{{2015,5,29},{19,8,36}}},
{"/Users/alex/tmp/hello_world/src/without_erlydtl.erl",
{{2015,5,29},{19,9,27}}}],
[],
[{discover_modules,
{1432916154833575,#Ref<0.0.0.1403>}},
{discover_src_dirs,
{1432916124887192,#Ref<0.0.0.540>}},
{discover_src_files,
{1432916124940838,#Ref<0.0.0.1286>}},
{compare_src_files,
{1432916125150523,#Ref<0.0.0.1399>}},
{compare_beams,
{1432916125024755,#Ref<0.0.0.1381>}},
{compare_hrl_files,
{1432916125024790,#Ref<0.0.0.1384>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1432916154909495,#Ref<0.0.0.1457>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
Scanning source files...
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1432916154923602,#Ref<0.0.0.1511>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
Scanning source files...
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1432916154947296,#Ref<0.0.0.1565>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
Scanning source files...
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1432916154964778,#Ref<0.0.0.1619>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
Scanning source files...
=ERROR REPORT==== 29-May-2015::19:15:24 ===
** Generic server sync_scanner terminating
** Last message in was {'$gen_cast',discover_src_dirs}
** When Server state == {state,
[erlydtl_runtime,test_dtl,with_erlydtl,
cowboy_handler,cow_qs,cow_http_hd,cowboy_req,
cowboy_protocol,sync_notify,sync_utils,
sync_scanner,sync_options,sync,hello_world_sup,
ranch_acceptor,ranch_acceptors_sup,
ranch_conns_sup,ranch_listener_sup,ranch_tcp,
ranch,cowboy,cowboy_router,hello_world_app,
cowboy_clock,cowboy_sup,cowboy_app,ranch_server,
ranch_sup,ranch_app,erts_internal,erlang,
erl_prim_loader,prim_zip,zlib,prim_file,
prim_inet,prim_eval,init,otp_ring0],
[],[],[],[],undefined,[],[],
[{discover_modules,
{1432916154984849,#Ref<0.0.0.1673>}}],
false,false}
** Reason for termination ==
** {{badmatch,undefined},
[{sync_scanner,'-discover_source_dirs/2-fun-0-',2,
[{file,"src/sync_scanner.erl"},{line,729}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
{sync_scanner,discover_source_dirs,2,
[{file,"src/sync_scanner.erl"},{line,739}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,593}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,659}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
=INFO REPORT==== 29-May-2015::19:15:24 ===
application: sync
exited: shutdown
type: permanent
{"Kernel pid terminated",application_controller,"{application_terminated,sync,shutdown}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_terminated,sync,shutdown})
~/tmp/hello_world$
https://developer.apple.com/notifications/
osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"'
If any way to trigger some function when module/s recompiled?
As title,Thanks! @rustyio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.