Resolving LSP Diagnostic on Elixir Ecto.Schema Changeset Function

71
clicks
Resolving LSP Diagnostic on Elixir Ecto.Schema Changeset Function

Source: reddit.com

Type: Discussion

In the article, TheWholeThing presents a problem where the Language Server Protocol (LSP) shows an error message for an Elixir function that is supposed to handle changesets in an Ecto.Schema module. The error message indicates that there is no local return for the `changeset/1` function and that the function call will not succeed. This issue arises while using editors like neovim and VS Code. However, contrary to the error warning, the code compiles and runs without any problems. TheWholeThing is potentially seeking an explanation or a fix to the misleading LSP messages believing that the code is correctly implemented. The environment details include Elixir version 1.16.2 compiled with Erlang/OTP 26.

© HashMerge 2024