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

Dialyzer issue on VS Code and Vim #1443

Closed
mcesaro opened this issue Jul 24, 2023 · 1 comment · Fixed by #1444
Closed

Dialyzer issue on VS Code and Vim #1443

mcesaro opened this issue Jul 24, 2023 · 1 comment · Fixed by #1444
Labels
bug Something isn't working

Comments

@mcesaro
Copy link

mcesaro commented Jul 24, 2023

Describe the bug
The PLT-based erlang LS features are not available on VS Code and Vim editor

To Reproduce
Just open any erlang OTP 26 project with a valid PLT file generated by dialyzer on VS Code and look at the Output tab.

Expected behavior
Successful processing of the dialyzer PLT file and specification suggestions working.

Actual behavior
No suggestions and any other feature related to dialyzer analysis.
In the VS Code output tab we see this warning message:

Warn  - 2:46:29 PM] [2023-07-24T14:46:29.804060+02:00] [warning] Cannot extract typer info., Class: error, Exception: undef, Stacktrace: [{dialyzer_plt,from_file,["/home/max/work/test/_build/default/rebar3_26.0_plt"],[]},{els_typer,collect_info,1,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_typer.erl"},{line,302}]},{els_typer,get_info,1,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_typer.erl"},{line,83}]},{els_code_lens_suggest_spec,init,1,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_code_lens_suggest_spec.erl"},{line,29}]},{els_code_lens,lenses,2,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_code_lens.erl"},{line,91}]},{els_code_lens_provider,'-run_lenses_job/1-lc$^0/1-0-',3,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_code_lens_provider.erl"},{line,37}]},{els_code_lens_provider,'-run_lenses_job/1-lc$^0/1-0-',3,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_code_lens_provider.erl"},{line,38}]},{els_code_lens_provider,'-run_lenses_job/1-fun-1-',2,[{file,"/home/runner/work/vscode/vscode/erlang_ls/apps/els_lsp/src/els_code_lens_provider.erl"},{line,38}]}] [els_code_lens_suggest_spec:init/1 L39] <0.486.0>

The thing I cannot explain is that in the error description:

[warning] Cannot extract typer info., Class: error, Exception: undef, Stacktrace: [{dialyzer_plt,from_file,["/home/max/work/test/_build/default/rebar3_26.0_plt"],[]}

the reference to the undocumented dialyzer_plt:from_file() function is suspect, since I can't find it in the dialyzer source code in the erlang OTP repository.

Thanks

Context

  • erlang_ls version (tag/sha):

  • Editor used:
    Version: 1.80.1
    Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
    Date: 2023-07-12T17:22:25.257Z
    Electron: 22.3.14
    ElectronBuildId: 21893604
    Chromium: 108.0.5359.215
    Node.js: 16.17.1
    V8: 10.8.168.25-electron.0
    OS: Linux x64 6.2.1-060201-generic

  • LSP client used:
    Erlang LS VS Code ext version 0.0.40 Server (0.44.1 -> 0.48.0)
    Published 11/17/2019, 22:56:41
    Last released 7/8/2023, 12:23:40
    Last updated 7/10/2023, 08:01:25
    Identifier erlang-ls.erlang-ls

@mcesaro
Copy link
Author

mcesaro commented Jul 26, 2023

Cool, thanks.
Just an observation: before opening the issue I tried to replace dialyzer_plt:from_file() with dialyzer_iplt:from_file() , but then the call still failed complaining that the PLT file generated by rebar3 dialyzer is not incremental.

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