expert-lsp / expert-lsp/expert

(ArgumentError) could not call Module.*_attribute/2 because the module * is already compiled

未關閉
#508 5 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Elixir
星號
2.1k
分支
113
平均合併
1 天 10 小時
30 天內合併 PR
26

描述

I am getting the following series of errors on one specific LiveView component file in one project:

```log
2026-03-13 13:46:33.468 [info] [Warn - 13:46:33] ** (RuntimeError) ~H requires a variable named "assigns" to exist and be set to a map
(phoenix_live_view 1.1.24) lib/phoenix_component.ex:917: Phoenix.Component."MACRO-sigil_H"/3
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/normalized/macro/env.ex:54: anonymous fn/5 in XPElixirSense.Core.Normalized.Macro.Env.wrap_expansion/7
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:2144: XPElixirSense.Core.Compiler.expand_macro_callback/7
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:117: XPElixirSense.Core.Compiler.expand/3
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:2055: XPElixirSense.Core.Compiler.expand_macro/7
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:117: XPElixirSense.Core.Compiler.expand/3
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:2165: XPElixirSense.Core.Compiler.expand_macro_callback/7
(xp_elixir_sense 2.0.0) lib/elixir_sense/core/compiler.ex:117: XPElixirSense.Core.Compiler.expand/3
2026-03-13 13:46:33.469 [info] [Warn - 13:46:33] ** (ArgumentError) could not call Module.delete_attribute/2 because the module ShowcaseAppWeb.LiveStashClientTicTacToeLive is already compiled
(elixir 1.19.1) lib/module.ex:2429: Module.data_tables_for!/3
(elixir 1.19.1) lib/module.ex:1729: Module.delete_attribute/2
(phoenix_live_view 1.1.24) lib/phoenix_component/declarative.ex:1081: Phoenix.Component.Declarative.pop_slots/1
(phoenix_live_view 1.1.24) lib/phoenix_component/declarative.ex:753: Phoenix.Component.Declarative.register_component!/4
(phoenix_live_view 1.1.24) expanding macro: Phoenix.Component.Declarative.__pattern__!/2
(showcase_app 0.1.0) nofile:115: ShowcaseAppWeb.LiveStashClientTicTacToeLive.start_new_game/1
2026-03-13 13:46:33.470 [info] [Warn - 13:46:33] ** (ArgumentError) could not call Module.delete_attribute/2 because the module ShowcaseAppWeb.LiveStashClientTicTacToeLive is already compiled
(elixir 1.19.1) lib/module.ex:2429: Module.data_tables_for!/3
(elixir 1.19.1) lib/module.ex:1729: Module.delete_attribute/2
(phoenix_live_view 1.1.24) lib/phoenix_component/declarative.ex:1081: Phoenix.Component.Declarative.pop_slots/1
(phoenix_live_view 1.1.24) lib/phoenix_component/declarative.ex:753: Phoenix.Component.Declarative.register_component!/4
(phoenix_live_view 1.1.24) expanding macro: Phoenix.Component.Declarative.__pattern__!/2
(showcase_app 0.1.0) nofile:121: ShowcaseAppWeb.LiveStashClientTicTacToeLive.check_game_state/1
```

This small file comes from an example for a library of ours that we aim to publicize in `O(month)`, so I'm hesitant to waste time trying to make a cleanroom reproduction (i.e., I burned too much time trying to do this already). I can send the file or entire library (if needed) to whoever wants to fix this.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。