rustyio / sync

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

Sync crashing on ErlyDTL modules #52

Closed elbrujohalcon closed 9 years ago

elbrujohalcon commented 9 years ago

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, []}