Using Sync with LFE

48 views
Skip to first unread message

Adam Krupicka

unread,
Jul 4, 2017, 4:35:57 AM7/4/17
to Lisp Flavoured Erlang
Hello,
 
I've been trying to get something like Sync set up in my LFE project. First I tried the auto plugin in rebar3, but it doesn't register LFE files as well as apparently is bugged and doesn't work even on pure Erlang projects. So I gave Sync a try, but I keep getting the following error, any idea how to get this working?


=INFO REPORT==== 2-Jul-2017::18:27:22 ===
/home/me/dev/mything-server/src/controller-ssh.lfe:0: Recompiled.

=ERROR REPORT==== 2-Jul-2017::18:27:22 ===
** Generic server sync_scanner terminating 
** Last message in was {'$gen_cast',compare_src_files}
** When Server state == {state,
                            ['protocol-tcp',renderer,'controller-ssh',
                             lfe_codegen,lfe_doc,lfe_lint,lfe_pmod,
                             ssh_connection,lfe_macro_export,lfe_macro_record,
                             lfe_comp,sync_notify,sync_utils,sync_scanner,
                             sync_options,sync,lfe_edlin_expand,entity,
                             lfe_io_write,lfe_io_pretty,lfe_lib,lfe_internal,
                             lfe_macro,lfe_parse,lfe_scan,lfe_io_format,
                             lfe_io,lfe_eval,lfe_env,lfe_shell,lfe_init,
                             erts_dirty_process_code_checker,
                             erts_literal_area_collector,erl_tracer,
                             erts_internal,erlang,erl_prim_loader,prim_zip,
                             zlib,prim_file,prim_inet,prim_eval,init,
                             erts_code_purger,otp_ring0],
                            ["/home/me/dev/mything-server/_build/default/lib/sync/src",
                             "/home/me/dev/mything-server/src"],
                            ["/home/me/dev/mything-server/_build/default/lib/sync/src/sync.erl",
                             "/home/me/dev/mything-server/_build/default/lib/sync/src/sync_notify.erl",
                             "/home/me/dev/mything-server/_build/default/lib/sync/src/sync_options.erl",
                             "/home/me/dev/mything-server/_build/default/lib/sync/src/sync_scanner.erl",
                             "/home/me/dev/mything-server/_build/default/lib/sync/src/sync_utils.erl",
                             "/home/me/dev/mything-server/src/controller-ssh.lfe",
                             "/home/me/dev/mything-server/src/controller-tcp.lfe",
                             "/home/me/dev/mything-server/src/data.lfe",
                             "/home/me/dev/mything-server/src/entity-server.lfe",
                             "/home/me/dev/mything-server/src/entity-state.lfe",
                             "/home/me/dev/mything-server/src/entity-sup.lfe",
                             "/home/me/dev/mything-server/src/entity.lfe",
                             "/home/me/dev/mything-server/src/protocol-tcp.lfe",
                             "/home/me/dev/mything-server/src/renderer.lfe",
                             "/home/me/dev/mything-server/src/server-tcp.lfe",
                             "/home/me/dev/mything-server/src/stalker-app.lfe",
                             "/home/me/dev/mything-server/src/stalker-sup.lfe",
                             "/home/me/dev/mything-server/src/world-server.lfe"],
                            ["/home/me/dev/mything-server/_build/default/lib/sync/src",
                             "include"],
                            [],undefined,[],[],
                            [{discover_modules,
                                 {-576460560875601,
                                  #Ref<0.1286323230.37486593.133009>}},
                             {discover_src_dirs,
                                 {-576460560863423,
                                  #Ref<0.1286323230.37486593.133501>}},
                             {discover_src_files,
                                 {-576460585862364,
                                  #Ref<0.1286323230.37486593.133534>}}],
                            false,false}
** Reason for termination == 
** {{case_clause,{error,[{error,[{"/home/me/dev/mything-server/src/controller-tcp.lfe",
                                  [{30,lfe_lint,
                                    {illegal_pattern,[sock,'entity-pid']}},
                                   {30,lfe_lint,{unbound_symb,'entity-pid'}},
                                   {30,lfe_lint,{unbound_symb,sock}},
                                   {30,lfe_lint,{unbound_symb,sock}},
                                   {30,lfe_lint,{unbound_symb,'entity-pid'}},
                                   {30,lfe_lint,{unbound_symb,sock}},
                                   {30,lfe_lint,
                                    {unbound_symb,'entity-pid'}}]}],
                                []}],
                        [],[]}},
    [{sync_scanner,recompile_src_file,2,
                   [{file,"/home/me/dev/mything-server/_build/default/lib/sync/src/sync_scanner.erl"},
                    {line,547}]},
     {sync_scanner,process_src_file_lastmod,3,
                   [{file,"/home/me/dev/mything-server/_build/default/lib/sync/src/sync_scanner.erl"},
                    {line,431}]},
     {sync_scanner,handle_cast,2,
                   [{file,"/home/me/dev/mything-server/_build/default/lib/sync/src/sync_scanner.erl"},
                    {line,216}]},
     {gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,616}]},
     {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,686}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}

Adam Krupicka

unread,
Jul 8, 2017, 9:11:22 AM7/8/17
to Lisp Flavoured Erlang
Okay, apparently Sync doesn't work with rebar3. However I did manage to figure out how to set it up with the rebar3 auto plugin:

(1) N.B. that the plugin has to be installed globally: https://github.com/vans163/rebar3_auto/issues/5
(2) Apply this patch so that the plugin also looks for .lfe files: https://github.com/vans163/rebar3_auto/pull/15


A.K.

Federico Carrone

unread,
Jul 8, 2017, 9:30:58 AM7/8/17
to lisp-flavo...@googlegroups.com
How well does rebar3 auto works for you? It did not work very well for me, I really miss sync.

--
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-erlang+unsub...@googlegroups.com.
To post to this group, send email to lisp-flavoured-erlang@googlegroups.com.
Visit this group at https://groups.google.com/group/lisp-flavoured-erlang.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages