question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dialyzer doesn't report problems after Elixir 1.12 upgrade

See original GitHub issue

Symptoms

Sometimes after upgrading first to Erlang 24 and then later to Elixir 1.12 (can’t remember, the two was very close to each other in time but I think it was the Elixir upgrade) I noticed dialyzer warnings were gone.

Is this the right repo?

I notice this using VSCode, this is the “entry point” of the problem.

Environment

Most of this can be filled out by running the VSCode command (by default bound to Ctrl+Shift+P) “ElixirLS: Copy Debug Info”

  • VSCode: 1.56.2
  • Electron: 12.0.4
  • Chrome: 89.0.4389.114
  • Node.js: 14.16.0
  • V8: 8.9.255.24-electron.0
  • Elixir & Erlang versions (elixir --version): 1.12.0
  • Erlang: 1:24.0.1-1
  • VSCode ElixirLS version: 0.7.0
  • Operating System Version: Ubuntu 20.04.2 LTS (5.4.0-73-generic #82-Ubuntu SMP x86_64 GNU/Linux)

Troubleshooting

  • Restart your editor (which will restart ElixirLS) sometimes fixes issues
  • Stop your editor, remove the entire .elixir_ls directory, then restart your editor

Nothing worked.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Defman21commented, Aug 20, 2021

@javobalazs I’d also go for removing the no_ options since they silence many useful reports from Dialyzer.

1reaction
javobalazscommented, Jul 20, 2021

Update: Dialyzer warning options are empty by default, so even if Dialyzer is run, vscode-elixir-ls won’t report anything. But when I set Dialyzer Warn Opts to the list copied from the option definitions (below, JSON), the reporting comes back. I think somehow, during the (or “an”) update the list was set to the default. Or the default was set to the empty list.

"elixirLS.dialyzerWarnOpts": [
      "error_handling",
      "no_behaviours",
      "no_contracts",
      "no_fail_call",
      "no_fun_app",
      "no_improper_lists",
      "no_match",
      "no_missing_calls",
      "no_opaque",
      "no_return",
      "no_undefined_callbacks",
      "no_unused",
      "underspecs",
      "unknown",
      "unmatched_returns",
      "overspecs",
      "specdiffs"
    ]

(Note to fellow developers: overspecs and specdiffs are kinda producing counterintuitive warnings that are artifacts of the “success typing” of Erlang, and are more or less useless for the purpose one is usually using Dialyzer for. You can switch them off without loosing anything.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dialyzer analysis failed with error #449 - elixir-lsp/elixir-ls
I tried to update the elixir-ls source version from the release 0.6.2 onwards and i found the problem exists from commint Dialyzer improvements ......
Read more >
Dialyxir doesn't find dep functions or types (Elixir 1.12)
When I run dialyxir on my project, using mix, it reports unknown function or unknown type errors for what appear to be every...
Read more >
Dialyzer Release Notes - Erlang/OTP
In rare circumstances, Dialyzer could crash analyzing code with a list comprehension whose value was ignored. (Thanks to Ulf Wiger for reporting this...
Read more >
Dialyzer does not catch errors on returned functions
Dialyzer is pretty optimistic in its analysis and ignores some categories of errors. This article provides some advanced explanations about ...
Read more >
Changelog for Elixir v1.12 - HexDocs
Elixir v1.12 is out with improvements to scripting, tighter Erlang/OTP 24 integration, stepped ranges, and dozen of new functions across the standard library....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found