Skip to content

Commit

Permalink
Fix dialyzer test when running locally (#271)
Browse files Browse the repository at this point in the history
* Fix dialyzer test when running locally

I'm testing running locally on arch linux. It appear that for me locally
for the "reports diagnostics then clears them once problems are fixed"
test I get the output I get the message:

    [ElixirLS Dialyzer] Analyzing 3 modules: [A, B, :erlang]

Instead of:

    [ElixirLS Dialyzer] Analyzing 2 modules: [A, B]

Adding a function definition in module C causes :erlang to not be
detected as needing to be analyzed.

* :lib.flush_receive() doesn't exist in the same place on supported erlang versions
  • Loading branch information
axelson authored May 29, 2020
1 parent 96f96ef commit 269e78d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ Push the tag
- `cd release`
- `zip elixir-ls.zip *`
- Attach elixir-ls.zip to the release on github https://github.com/elixir-lsp/elixir-ls/releases

# Debugging

If you're debugging a running server than `IO.inspect` is a good approach, any messages you create with it will be sent to your LSP client as a log message

To debug in tests you can use `IO.inspect(Process.whereis(:user), message, label: "message")` to send your output directly to the group leader of the test process.
3 changes: 3 additions & 0 deletions apps/language_server/test/fixtures/dialyzer/lib/c.ex
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
defmodule C do
def myfun do
1
end
end

0 comments on commit 269e78d

Please sign in to comment.