[<<][erlang][>>][..]
Sat Jul 15 16:05:07 EDT 2017

distel problem

(gw@127.0.0.1)13> distel:functions(web, "").
{ok,[]}

(gw@127.0.0.1)18> distel:functions(erlang, "").
{ok,["*","+","++","-","--","/=","<","=/=","=:=","=<","==",
     ">",">=","abs","adler32","adler32_combine","alloc_info",
     "alloc_sizes","and","append","append_element","apply",
     "atom_to_binary","atom_to_list","await_proc_exit",
     "await_sched_wall_time_modifications",
     [...]|...]}

Somehow it can't find the module..  Did something change?

This was needed to get the proper module list:

(gw@127.0.0.1)34> distel:rebuild_completions().
ok

But the function list is still not there... Maybe something broke
after erlang update?  This does seem to do some disassembly of the
.beam files.  Needs a closer look.



https://github.com/massemanet/distel/blob/master/src/distel.erl



Debugging:

make -C ~/emacs/distel
code:add_patha("/home/tom/emacs/distel/ebin/").
l(distel).


Performing raw queries seems to work:
xref:q(distel_completions, "(Fun) web : Mod").

Weird, now it works:
(gw@127.0.0.1)68> distel:functions(web,"").
{ok,["app_input","as_decoded_map","as_map","as_proplist",
     "atom","bool","button","cell_input","checkbox",
     "checkbox_set","checked","cowboy_http_handle",
     "default_user","exml","form","form_data","hmac",
     "hmac_decode","hmac_encode","html_body","id","integer",
     "integer_or_atom","link","make_id","resp_body",
     [...]|...]}

Not sure what exactly changed...
Maybe just reloading distel?

Yes I know what this is.
App no longer loads all the modules.

Now it brok again...
WTF.

So the problem is with xref:q 

I'm getting different results after killing the query server and
restarting with distel:rebuild_completions().

(gw@127.0.0.1)88> xref:q(distel_completions, "(Fun) web : Mod").
{ok,[{web,form,1},
     {web,id,1},
     {web,resp_spa,1},
     {web,table_input,1}]}

(gw@127.0.0.1)89> distel:rebuild_completions().
ok
(gw@127.0.0.1)90> xref:q(distel_completions, "(Fun) web : Mod").
{error,xref_compiler,{unknown_constant,"web"}}

It's as if some results get lost.

Yeah really no way to debug this apart from knowing how it is all
supposed to work.



[Reply][About]
[<<][erlang][>>][..]