elixir-lsp / elixir-ls

A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
https://elixir-lsp.github.io/elixir-ls/
Apache License 2.0
1.5k stars 198 forks source link

Metadata build crashes on Absinthe schema #999

Closed lukaszsamson closed 3 weeks ago

lukaszsamson commented 1 year ago

elixir_sense is unable to expand __using__ macro

[Warn  - 9:23:43 AM] ** (ErlangError) Erlang error: "ArgumentError during metadata build pre:\ncould not call Module.register_attribute/3 because the module BlogWeb.Schema.AccountTypes is already compiled\nast node: {:use, [end_of_expression: [newlines: 0, line: 2, column: 31], line: 2, column: 3], [{:__aliases__, [last: [line: 2, column: 23], line: 2, column: 7], [:Absinthe, :Schema, :Notation]}]}"
    (elixir 1.14.5) lib/module.ex:2504: Module.assert_not_readonly!/2
    (elixir 1.14.5) lib/module.ex:1626: Module.register_attribute/3
    (absinthe 1.7.5) expanding macro: Absinthe.Schema.Notation.__using__/1
    nofile: BlogWeb.Schema.AccountTypes (module)
lukaszsamson commented 3 weeks ago

This issue is now stale. The metadata builder engine in elixir_sense has been replaced