[Distel-hackers] patch for completion
Status: Beta
Brought to you by:
lukeg
From: Dimitris D. <di...@gm...> - 2008-08-10 19:37:14
|
Hello, I found an otp_doc server crash while trying to complete a function in a non otp module. To reproduce try to complete: distel:ap Unexpected reply: [rex [badrpc [EXIT [[bad_return_value no_data] [gen_server call (otp_doc [funcs "distel" "ap" nil])]]]]] =ERROR REPORT==== 10-Aug-2008::21:57:38 === ** Generic server otp_doc terminating ** Last message in was {funcs,"distel","ap",[]} ** When Server state == {state,"/opt/local/lib/erlang",file,"-"} ** Reason for termination == ** {bad_return_value,no_data} I found out that e_get({file,M}) thows no_data since M is not an otp module and does not exist in the cache. The attached patch solves this problem and modifies distel:modules and distel:functions to use xref if the otp_doc returns an empty list. Cheers, Dimitris |