Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undef while applying rule line_length top 24 #562

Closed
josephDunne opened this issue Jul 30, 2021 · 0 comments
Closed

undef while applying rule line_length top 24 #562

josephDunne opened this issue Jul 30, 2021 · 0 comments

Comments

@josephDunne
Copy link

josephDunne commented Jul 30, 2021

Hi, I get the following error in the erlang_ls server log while running on OTP 24:

[2021-07-30T16:52:56.742371+01:00] [warning] Background job aborted. [reason={function_clause,[{els_elvis_diagnostics,format_rules,["src/file.erl",[#{error_msg => "'~p' while applying rule '~p'.",info => [undef,line_length]}]],[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,68}]},{els_elvis_diagnostics,format_diagnostics,1,[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,62}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1254}]},{els_background_job,handle_info,2,[{file,"src/erlang_ls/apps/els_lsp/src/els_background_job.erl"},{line,160}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}] [els_background_job:terminate/2 L196] <0.213.0>
[2021-07-30T16:52:56.757527+01:00] [error] Generic server <0.213.0> terminating. Reason: {function_clause,[{els_elvis_diagnostics,format_rules,["src/file.erl",[#{error_msg => "'~p' while applying rule '~p'.",info => [undef,line_length]}]],[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,68}]},{els_elvis_diagnostics,format_diagnostics,1,[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,62}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1254}]},{els_background_job,handle_info,2,[{file,"src/erlang_ls/apps/els_lsp/src/els_background_job.erl"},{line,160}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}. Last message: exec. State: #{config => #{entries => [<<"file://src/file.erl">>],on_complete => #Fun<els_diagnostics.1.67775306>,on_error => #Fun<els_background_job.0.71521734>,task => #Fun<els_diagnostics.0.67775306>,title => <<"Elvis (file)">>},current => 0,internal_state => undefined,progress_enabled => true,show_percentages => true,spinning_wheel => undefined,step => 100.0,token => <<"297b1d81-706f-4d74-b76b-b635f87b861e">>,total => 1}. [gen_server:error_info/7 L949] <0.213.0>
[2021-07-30T16:52:56.758508+01:00] [error] crasher: initial call: els_background_job:init/1, pid: <0.213.0>, registered_name: [], error: {function_clause,[{els_elvis_diagnostics,format_rules,["src/file.erl",[#{error_msg => "'~p' while applying rule '~p'.",info => [undef,line_length]}]],[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,68}]},{els_elvis_diagnostics,format_diagnostics,1,[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,62}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1254}]},{els_background_job,handle_info,2,[{file,"src/erlang_ls/apps/els_lsp/src/els_background_job.erl"},{line,160}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [els_background_job_sup,els_sup,<0.157.0>], message_queue_len: 1, messages: [{'EXIT',<0.416.0>,normal}], links: [<0.179.0>], dictionary: [], trap_exit: true, status: running, heap_size: 75113, stack_size: 29, reductions: 4846283; neighbours: [proc_lib:crash_report/4 L525] <0.213.0>
[2021-07-30T16:52:56.759133+01:00] [error] Supervisor: {local,els_background_job_sup}. Context: child_terminated. Reason: {function_clause,[{els_elvis_diagnostics,format_rules,["src/file.erl",[#{error_msg => "'~p' while applying rule '~p'.",info => [undef,line_length]}]],[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,68}]},{els_elvis_diagnostics,format_diagnostics,1,[{file,"src/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,62}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1254}]},{els_background_job,handle_info,2,[{file,"src/erlang_ls/apps/els_lsp/src/els_background_job.erl"},{line,160}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}. Offender: id=els_background_job,pid=<0.213.0>. [supervisor:do_restart/3 L751] <0.179.0>

looks like a function clause in els_elvis_diagnostics to do with the change in line lengths in the compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant