Closed mat-hek closed 2 months ago
Thanks for the report!
I'm not 100% sure that the error uncovered in the logs is related to the module not being found, but it's probably worth pulling on both threads. Let's start with the error:
Code.Identifier.inspect_as_atom/1
was a function in the private Code.Identifier
module until Elixir 1.14, so it makes sense that a call to it would raise an error on Elixir 1.17.2 (which seems to be the runtime version from the stacktrace). That function isn't used anywhere in Lexical nor in elixir_sense (which Lexical uses).
Can you please do the following:
mix do deps.compile --force, compile --force
rm -r .lexical/build
, and then open your editor and confirm the issue persistsSomehow I totally forgot to try removing .lexical
... It even may have been created by the previous version of Lexical. Now it seems to work ;)
Anyway, in case you need it, the project's been compiling normally outside of Lexical, and the deps are:
{:membrane_core, "~> 1.1"},
{:membrane_webrtc_plugin, "~> 0.21.0"},
{:membrane_opus_plugin, "~> 0.20.0"},
{:membrane_aac_plugin, "~> 0.18.0"},
{:membrane_aac_fdk_plugin, "~> 0.18.0"},
{:membrane_h26x_plugin, "~> 0.10.0"},
{:membrane_h264_ffmpeg_plugin, "~> 0.32.0"},
{:membrane_mp4_plugin,
github: "membraneframework/membrane_mp4_plugin", branch: "wip-avc3", override: true},
{:membrane_realtimer_plugin, "~> 0.9.0"},
{:membrane_http_adaptive_stream_plugin, "~> 0.18.0"},
{:membrane_rtmp_plugin, "~> 0.24.0"},
{:membrane_ffmpeg_swresample_plugin, "~> 0.20.0"},
{:membrane_hackney_plugin, "~> 0.11.0"},
{:burrito, "~> 1.0", runtime: burrito?()},
{:membrane_ffmpeg_swscale_plugin, ">= 0.0.0"},
{:image, ">= 0.0.0"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
{:credo, ">= 0.0.0", only: :dev, runtime: false}
Thanks for your help ;)
I'm glad that fixed it! This is still an area Lexical could improve on. Users shouldn't ever have to delete the .lexical
directory, even between versions, but there are clearly some edge cases (probably to do with Elixir/OTP version updates).
@scohen A maybe-not-good idea: If Lexical encounters errors the first time it compiles a project, what if it recompiled everything from scratch (maybe silently)? The idea being that projects are usually saved in a healthy state, so if Lexical is failing to compile a project the first time it's opened, it may be a faulty build cache.
Maybe also invalidate the cache after the Lexical update? 🤔
I'm getting an error like this
Interestingly, 'go to definition' works for the 'not found' module 🤔 It happens mostly for modules from deps, however, sometimes also for the project modules. In the latter case, re-saving the problematic module helps. Restarting Lexical or even the editor doesn't help.
Extension version: 0.0.18 Lexical version: probably the latest, as that's what the extension says it downloads
When this happens, lexical.log shows the following error:
and project.log shows the following error: