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

Elvis crashes when the line is "unknown" #1525

Closed
zsoci opened this issue Jun 7, 2024 · 0 comments · Fixed by #1526
Closed

Elvis crashes when the line is "unknown" #1525

zsoci opened this issue Jun 7, 2024 · 0 comments · Fixed by #1526
Labels
bug Something isn't working

Comments

@zsoci
Copy link
Contributor

zsoci commented Jun 7, 2024

Describe the bug
[2024-06-07T17:13:29.167149+02:00] [info] (find_me_here): {export_used_types,"Type ~p/~p, defined on line ~p, is used by an exported function but not exported itself",unknown,[arda_obj,0,unknown],2,1,[84,121,112,101,32,"the_type",47,"0",44,32,100,101,102,105,110,101,100,32,111,110,32,108,105,110,101,32,"unknown",44,32,105,115,32,117,115,101,100,32,98,121,32,97,110,32,101,120,112,111,114,116,101,100,32,102,117,110,99,116,105,111,110,32,98,117,116,32,110,111,116,32,101,120,112,111,114,116,101,100,32,105,116,115,101,108,102]} [els_elvis_diagnostics:diagnostic/5 L109] <0.192.0>

To Reproduce
Include an unexported type in the .erl

Expected behavior
The warning should use line nr 0.

Actual behavior
[2024-06-07T17:19:44.010006+02:00] [error] crasher: initial call: els_background_job:init/1, pid: <0.191.0>, registered_name: [], exit: {{badarith,[{els_elvis_diagnostics,diagnostic,5,[{file,"/Users/zsoci/Projects/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,112}]},{els_elvis_diagnostics,format_item,2,[{file,"/Users/zsoci/Projects/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,91}]},{els_elvis_diagnostics,format_rules,1,[{file,"/Users/zsoci/Projects/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,85}]},{els_elvis_diagnostics,format_diagnostics,1,[{file,"/Users/zsoci/Projects/erlang_ls/apps/els_lsp/src/els_elvis_diagnostics.erl"},{line,65}]},{lists,flatmap_1,2,[{file,"lists.erl"},{line,1579}]},{els_background_job,'-handle_info/2-fun-0-',10,[{file,"/Users/zsoci/Projects/erlang_ls/apps/els_lsp/src/els_background_job.erl"},{line,205}]}]},[{gen_server,handle_common_reply,8,[{file,"gen_server.erl"},{line,1226}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}, ancestors: [els_background_job_sup,els_sup,<0.140.0>], message_queue_len: 0, messages: [], links: [<0.145.0>], dictionary: [], trap_exit: true, status: running, heap_size: 28690, stack_size: 28, reductions: 73638; neighbours: [proc_lib:crash_report/4 L584] <0.191.0>

Context

  • erlang_ls version (tag/sha): main
  • Editor used: VSCode
  • LSP client used:
@zsoci zsoci added the bug Something isn't working label Jun 7, 2024
zsoci added a commit to zsoci/erlang_ls that referenced this issue Jun 7, 2024
zsoci added a commit to zsoci/erlang_ls that referenced this issue Jun 13, 2024
zengjinc pushed a commit to zengjinc/erlang_ls that referenced this issue Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant