elixir-tools / discussions

Discussion forum for all things Elixir developer tooling
MIT License
0 stars 0 forks source link

Getting tons of errors from ElixirLS since last update #6

Closed dkarter closed 1 year ago

dkarter commented 1 year ago

Thank you so much for this plugin!

I noticed some weird behaviors since the last update of ElixirLS (by elixir-tools.nvim). Not sure if this is related to this plugin or not, but it appears that the language server is in some infinite loop and throwing errors and notifications non-stop. This also caused output_panel plugin to crash and block my editor, and when I removed output_panel it started showing this after saving a file:

https://github.com/elixir-tools/elixir-tools.nvim/assets/551858/308ea2e3-2bd7-4297-84c9-41d44acc3d09

Here's another example of the initial error in a more complete form: Screenshot 2023-07-21 at 13 13 31

My env: Screenshot 2023-07-21 at 12 59 42 Screenshot 2023-07-21 at 13 00 09

dkarter commented 1 year ago

I'm actually not sure this is ElixirLS related, because I downgraded to the previous version of ElixirLS (v0.15.0) using the tag in elixir-tools setup, and it is still showing me these errors.

Here's the ElixirOutputPanel (which does not show the errors):

[Info] Started ElixirLS v0.15.0
[Info] Running in /Users/dorian/dev/core
[Info] ElixirLS built with elixir "1.14.5" on OTP "25"
[Info] Running on elixir "1.14.5 (compiled with Erlang/OTP 25)" on OTP "25"
[Info] Protocols are not consolidated
[Info] Elixir sources not found (checking in /home/build/elixir). Code navigation to Elixir modules disabled.
[Info] DETS databases will be rebuilt
[Info] Loaded DETS databases in 18ms
[Info] Starting build with MIX_ENV: test MIX_TARGET: host
[Log] ==> eredis
[Log] Compiling 6 files (.erl)
[Log] Generated eredis app
[Log] ==> file_system
[Log] Compiling 7 files (.ex)
[Log] Generated file_system app
[Log] ==> gen_stage
[Log] Compiling 10 files (.ex)
[Log] Generated gen_stage app
[Log] ==> uri_query
[Log] Compiling 1 file (.ex)
[Log] Generated uri_query app
[Log] ==> decimal
[Log] Compiling 4 files (.ex)
[Log] Generated decimal app
[Log] ==> mime
[Log] Compiling 1 file (.ex)
[Log] Generated mime app
[Log] ==> nimble_options
[Log] Compiling 3 files (.ex)
[Log] Generated nimble_options app
[Log] ==> nimble_parsec
[Log] Compiling 4 files (.ex)
[Info] Experimental server is disabled.
[Log] Generated nimble_parsec app
[Log] ==> bunt
[Log] Compiling 2 files (.ex)
[Log] Generated bunt app
[Log] ===> Analyzing applications...
[Log] ===> Compiling unicode_util_compat
[Log] ===> Analyzing applications...
[Log] ===> Compiling idna
[Warning] Received $/cancelRequest for unknown request id: 17
[Warning] Received $/cancelRequest for unknown request id: 18
[Warning] Received $/cancelRequest for unknown request id: 25
[Warning] Received $/cancelRequest for unknown request id: 36
[Warning] Received $/cancelRequest for unknown request id: 37
[Log] ===> Analyzing applications...
[Log] ===> Compiling telemetry
[Log] ==> telemetry_metrics
[Log] Compiling 7 files (.ex)
[Log] Generated telemetry_metrics app
[Log] ==> telemetry_metrics_prometheus_core
[Log] Compiling 9 files (.ex)
[Log] Generated telemetry_metrics_prometheus_core app
[Log] ===> Analyzing applications...
[Log] ===> Compiling telemetry_poller
[Log] ==> jason
[Log] Compiling 10 files (.ex)
[Warning] Received $/cancelRequest for unknown request id: 53
[Log] Generated jason app
[Log] ==> recon
[Log] Compiling 6 files (.erl)
[Log] Generated recon app
[Log] ==> comeonin
[Log] Compiling 4 files (.ex)
[Log] Generated comeonin app
[Log] ==> mox
[Log] Compiling 3 files (.ex)
[Log] Generated mox app
[Log] ==> db_connection
[Log] Compiling 15 files (.ex)
[Log] Generated db_connection app
[Log] ==> phoenix_pubsub
[Log] Compiling 11 files (.ex)
[Log] Generated phoenix_pubsub app
[Log] ==> plug_crypto
[Log] Compiling 5 files (.ex)
[Log] Generated plug_crypto app
[Log] ==> hpax
[Log] Compiling 4 files (.ex)
[Log] Generated hpax app
[Log] ===> Analyzing applications...
[Log] ===> Compiling verl
[Log] ===> Analyzing applications...
[Log] ===> Compiling yamerl
[Log] ===> Analyzing applications...
[Log] ===> Compiling mimerl
[Log] ==> xml_builder
[Log] Compiling 3 files (.ex)
[Log] Generated xml_builder app
[Log] ==> absinthe
[Log] Compiling 1 file (.erl)
[Log] Compiling 264 files (.ex)
[Log] Generated absinthe app
[Log] ===> Analyzing applications...
[Log] ===> Compiling lru
[Log] ==> jose
[Log] Compiling 112 files (.erl)
[Log] Compiling 8 files (.ex)
[Log] Generated jose app
[Log] ===> Analyzing applications...
[Log] ===> Compiling ranch
[Log] ===> Analyzing applications...
[Log] ===> Compiling gen_smtp
[Log] ==> ssl_verify_fun
[Log] Compiling 7 files (.erl)
[Log] Generated ssl_verify_fun app
[Log] ===> Analyzing applications...
[Log] ===> Compiling backoff
[Log] ===> Analyzing applications...
[Log] ===> Compiling jsx
[Log] ===> Analyzing applications...
[Log] ===> Compiling certifi
[Log] ==> justify
[Log] Compiling 11 files (.ex)
[Log] Generated justify app
[Log] ==> ecto
[Log] Compiling 56 files (.ex)
[Log] Generated ecto app
[Log] ==> absinthe_relay
[Log] Compiling 19 files (.ex)
[Log] Generated absinthe_relay app
[Log] ==> credo
[Log] Compiling 242 files (.ex)
[Log] Generated credo app
[Log] ==> plug
[Log] Compiling 1 file (.erl)
[Log] Compiling 40 files (.ex)
[Log] Generated plug app
[Log] ==> absinthe_plug
[Log] Compiling 18 files (.ex)
[Warning] warning: Application.get_env/2 is discouraged in the module body, use Application.compile_env/3 instead
  lib/absinthe/plug/graphiql/assets.ex:5: Absinthe.Plug.GraphiQL.Assets

[Log] Generated absinthe_plug app
[Log] ==> guardian
[Log] Compiling 25 files (.ex)
[Log] Generated guardian app
[Log] ==> phoenix_html
[Log] Compiling 9 files (.ex)
[Log] Generated phoenix_html app
[Log] ==> phoenix_template
[Log] Compiling 4 files (.ex)
[Log] Generated phoenix_template app
[Log] ==> phoenix_view
[Log] Compiling 1 file (.ex)
[Log] Generated phoenix_view app
[Log] ==> postgrex
[Log] Compiling 68 files (.ex)
[Log] Generated postgrex app
[Log] ==> observer_cli
[Log] Compiling 13 files (.erl)
[Log] Generated observer_cli app
[Log] ==> joken
[Log] Compiling 8 files (.ex)
[Log] Generated joken app
[Log] ==> faker
[Log] Compiling 110 files (.ex)
[Log] Generated faker app
[Log] ==> detour
[Log] Compiling 6 files (.ex)
[Log] Generated detour app
[Log] ===> Analyzing applications...
[Log] ===> Compiling parse_trans
[Log] ==> money
[Log] Compiling 13 files (.ex)
[Log] Generated money app
[Log] ==> ecto_sql
[Log] Compiling 25 files (.ex)
[Log] Generated ecto_sql app
[Log] ==> ayesql
[Log] Compiling 2 files (.erl)
[Log] Compiling 12 files (.ex)
[Log] Generated ayesql app
[Log] ==> guardian_db
[Log] Compiling 5 files (.ex)
[Log] Generated guardian_db app
[Log] ==> oban
[Log] Compiling 53 files (.ex)
[Log] Generated oban app
[Log] ==> nimble_pool
[Log] Compiling 2 files (.ex)
[Log] Generated nimble_pool app
[Log] ===> Analyzing applications...
[Log] ===> Compiling metrics
[Log] ===> Analyzing applications...
[Log] ===> Compiling hackney
[Log] ==> digital_ocean
[Log] Compiling 36 files (.ex)
[Log] Generated digital_ocean app
[Log] ==> ex_easypost
[Log] Compiling 27 files (.ex)
[Log] Generated ex_easypost app
[Log] ==> metabase
[Log] Compiling 11 files (.ex)
[Log] Generated metabase app
[Log] ==> ory_hydra
[Log] Compiling 11 files (.ex)
[Log] Generated ory_hydra app
[Log] ==> stripity_stripe
[Log] Compiling 92 files (.ex)
[Log] Generated stripity_stripe app
[Log] ==> excoveralls
[Log] Compiling 29 files (.ex)
[Log] Generated excoveralls app
[Log] ==> sage
[Log] Compiling 7 files (.ex)
[Log] Generated sage app
[Log] ==> cors_plug
[Log] Compiling 1 file (.ex)
[Log] Generated cors_plug app
[Log] ==> parallel_stream
[Log] Compiling 11 files (.ex)
[Log] Generated parallel_stream app
[Log] ==> csv
[Log] Compiling 10 files (.ex)
[Log] Generated csv app
[Log] ==> castore
[Log] Compiling 1 file (.ex)
[Log] Generated castore app
[Log] ==> mint
[Log] Compiling 1 file (.erl)
[Log] Compiling 19 files (.ex)
[Log] Generated mint app
[Log] ==> finch
[Log] Compiling 13 files (.ex)
[Log] Generated finch app
[Log] ==> req
[Log] Compiling 5 files (.ex)
[Log] Generated req app
[Log] ==> octo_fetch
[Log] Compiling 3 files (.ex)
[Log] Generated octo_fetch app
[Log] ==> rustler_precompiled
[Log] Compiling 4 files (.ex)
[Log] Generated rustler_precompiled app
[Log] ==> mjml
[Log] Compiling 3 files (.ex)
[Log] Copying NIF from cache and extracting to /Users/dorian/dev/core/.elixir_ls/build/test/lib/mjml/priv/native/libmjml_nif-v1.5.0-nif-2.16-aarch64-apple-darwin.so
[Log] Generated mjml app
[Log] ==> elixir_make
[Log] Compiling 6 files (.ex)
[Log] Generated elixir_make app
[Log] ==> argon2_elixir
[Log] mkdir -p /Users/dorian/dev/core/.elixir_ls/build/test/lib/argon2_elixir/priv
[Log] cc -g -O3 -pthread -Wall -Wno-format-truncation -I"/Users/dorian/.asdf/installs/erlang/25.3.2/erts-13.2.2/include" -Iargon2/include -Iargon2/src -Ic_src -dynamiclib -undefined dynamic_lookup  argon2/src/argon2.c argon2/src/core.c argon2/src/blake2/blake2b.c argon2/src/thread.c argon2/src/encoding.c argon2/src/ref.c c_src/argon2_nif.c -o /Users/dorian/dev/core/.elixir_ls/build/test/lib/argon2_elixir/priv/argon2_nif.so
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]
[Log] 1 warning generated.
[Log] Compiling 3 files (.ex)
[Log] Generated argon2_elixir app
[Log] ==> websock
[Log] Compiling 1 file (.ex)
[Log] Generated websock app
[Log] ==> sweet_xml
[Log] Compiling 2 files (.ex)
[Log] Generated sweet_xml app
[Log] ==> ex_aws
[Log] Compiling 27 files (.ex)
[Log] Generated ex_aws app
[Log] ==> ex_aws_acm
[Log] Compiling 1 file (.ex)
[Log] Generated ex_aws_acm app
[Log] ==> ex_aws_s3
[Log] Compiling 7 files (.ex)
[Log] Generated ex_aws_s3 app
[Log] ===> Analyzing applications...
[Log] ===> Compiling cowlib
[Log] ===> Analyzing applications...
[Log] ===> Compiling cowboy
[Log] ===> Analyzing applications...
[Log] ===> Compiling cowboy_telemetry
[Log] ==> plug_cowboy
[Log] Compiling 5 files (.ex)
[Log] Generated plug_cowboy app
[Log] ==> sentry
[Log] Compiling 16 files (.ex)
[Log] Generated sentry app
[Log] ==> bypass
[Log] Compiling 5 files (.ex)
[Warning] warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/bypass/utils.ex:6: Bypass.Utils

[Log] Generated bypass app
[Log] ==> websock_adapter
[Log] Compiling 2 files (.ex)
[Log] Generated websock_adapter app
[Log] ==> phoenix
[Log] Compiling 71 files (.ex)
[Log] Generated phoenix app
[Log] ==> new_relic_agent
[Log] Compiling 97 files (.ex)
[Log] Generated new_relic_agent app
[Log] ==> prom_ex
[Log] Compiling 37 files (.ex)
[Log] Generated prom_ex app
[Log] ===> Analyzing applications...
[Log] ===> Compiling gun
[Log] src/gun.erl:654:29: Warning: erlang:get_stacktrace/0 is removed; use the new try/catch syntax for retrieving the stack backtrace

[Log] ===> Analyzing applications...
[Log] ===> Compiling shotgun
[Log] ===> Analyzing applications...
[Log] ===> Compiling quickrand
[Log] ===> Analyzing applications...
[Log] ===> Compiling uuid
[Log] ===> Analyzing applications...
[Log] ===> Compiling ldclient
[Log] ==> mail
[Log] Compiling 13 files (.ex)
[Warning] warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/mail/renderers/rfc_2822.ex:25: Mail.Renderers.RFC2822

[Log] Generated mail app
[Log] ==> core
[Log] Compiling 600 files (.ex)
[Log] Generated core app
[Info] Compile took 77176 milliseconds
[Info] [ElixirLS WorkspaceSymbols] Indexing...
[Info] [ElixirLS Dialyzer] Checking for stale beam files
[Info] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info] [ElixirLS Dialyzer] Found 3014 changed files in 1695 milliseconds
[Info] [ElixirLS WorkspaceSymbols] 835 callbacks added to index
[Info] [ElixirLS WorkspaceSymbols] 3101 modules added to index
[Info] [ElixirLS WorkspaceSymbols] 2361 types added to index
[Info] Starting build with MIX_ENV: test MIX_TARGET: host
[Warning] Received $/cancelRequest for unknown request id: 77
[Info] Compile took 2321 milliseconds
[Info] [ElixirLS Dialyzer] Checking for stale beam files
[Info] [ElixirLS WorkspaceSymbols] 35680 functions added to index
[Info] [ElixirLS Dialyzer] Found 3014 changed files in 1804 milliseconds
[Info] [ElixirLS Dialyzer] Analyzing 3014 modules: [EasyPost.Batch, Joken.Error, :jose_jwa_xchacha20, Mix.Tasks.Ecto, Core.Web.Developer.Controllers.CustomerEvent, Core.Mocks.Repos.LaunchDarkly, Ecto.Migration.Runner, :jose_jwa_base64url, Credo.Check.Readability.SingleFunctionToBlockPipe, :cowboy_middleware, PromEx.GrafanaClient, ExAws.Operation.S3, Core.Domain.Schemas.Tracker.Location, Oban.Notifiers.PG, Absinthe.Type.NonNull, JOSE.JWS, Detour.Assertions, Inspect.Credo.SourceFile, Sentry.PlugCapture, Ecto.Query.JoinExpr, Credo.CLI.Task.LoadAndValidateSourceFiles, Sage.CompensationErrorHandler, ExCoveralls.ConfServer, DBConnection.Query.Postgrex.Parameters, Credo.Execution.ExecutionIssues, AyeSQL.Error, Ecto.Adapter.Transaction, Credo.CLI.Output.UI, Absinthe.Utils.Suggestion, Core.Mocks.Domain, Mjml.Native, Inspect.JOSE.JWK, Credo.CLI.Command.Suggest.Output.FlyCheck, Detour.Application, Credo.Code.TokenAstCorrelation, Core.Web.Dashboard.Types.Arrival, Core.Domain.Operations.GetApp, EasyPost.Helpers.Body, Core.Domain.Operations.GetRules, Absinthe.Blueprint.Draft.Absinthe.Language.UnionTypeDefinition, Comeonin, Absinthe.Adapter.LanguageConventions, Core.Web.ID.Controllers.Ping, Core.Domain.Activities.ValidateTrackingPage, Core.Domain.Mailers.PasswordReset, Absinthe, :jose_xchacha20_poly1305_unsupported, Oban.TimeoutError, Faker.NaiveDateTime, Core.Web.Dashboard.Resolvers.Carrier, ...]
[Info] [ElixirLS Dialyzer] Analysis finished in 86623 milliseconds
[Info] [ElixirLS Dialyzer] Analyzing 3014 modules: [EasyPost.Batch, Joken.Error, :jose_jwa_xchacha20, Mix.Tasks.Ecto, Core.Web.Developer.Controllers.CustomerEvent, Core.Mocks.Repos.LaunchDarkly, Ecto.Migration.Runner, :jose_jwa_base64url, Credo.Check.Readability.SingleFunctionToBlockPipe, :cowboy_middleware, PromEx.GrafanaClient, ExAws.Operation.S3, Core.Domain.Schemas.Tracker.Location, Oban.Notifiers.PG, Absinthe.Type.NonNull, JOSE.JWS, Detour.Assertions, Inspect.Credo.SourceFile, Sentry.PlugCapture, Ecto.Query.JoinExpr, Credo.CLI.Task.LoadAndValidateSourceFiles, Sage.CompensationErrorHandler, ExCoveralls.ConfServer, DBConnection.Query.Postgrex.Parameters, Credo.Execution.ExecutionIssues, AyeSQL.Error, Ecto.Adapter.Transaction, Credo.CLI.Output.UI, Absinthe.Utils.Suggestion, Core.Mocks.Domain, Mjml.Native, Inspect.JOSE.JWK, Credo.CLI.Command.Suggest.Output.FlyCheck, Detour.Application, Credo.Code.TokenAstCorrelation, Core.Web.Dashboard.Types.Arrival, Core.Domain.Operations.GetApp, EasyPost.Helpers.Body, Core.Domain.Operations.GetRules, Absinthe.Blueprint.Draft.Absinthe.Language.UnionTypeDefinition, Comeonin, Absinthe.Adapter.LanguageConventions, Core.Web.ID.Controllers.Ping, Core.Domain.Activities.ValidateTrackingPage, Core.Domain.Mailers.PasswordReset, Absinthe, :jose_xchacha20_poly1305_unsupported, Oban.TimeoutError, Faker.NaiveDateTime, Core.Web.Dashboard.Resolvers.Carrier, ...]

My elixir-tools setup:

  elixir.setup {
    credo = { enable = true },
    -- experimental lsp for elixir only enabled when the env var NEXT_LS=true
    nextls = {
      enable = vim.env.NEXT_LS == 'true',
    },
    elixirls = {
      enable = not vim.env.NEXT_LS,
      tag = 'v0.15.0',
      on_attach = function(client, bufnr)
        vim.keymap.set('n', '<space>fp', ':ElixirFromPipe<cr>', { buffer = true, noremap = true })
        vim.keymap.set('n', '<space>tp', ':ElixirToPipe<cr>', { buffer = true, noremap = true })
        vim.keymap.set('v', '<space>em', ':ElixirExpandMacro<cr>', { buffer = true, noremap = true })
        on_attach(client, bufnr)
      end,
    },
  }
mhanberg commented 1 year ago

Hmm, you might want to see if there is another plugin you've installed that is making documentSymbols requests (i believe that is the data structure that was being spit out in the video).

ALso, since I don't think this is an elixir-tools.nvim issue, i'm going to turn this into a discussion