-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.22.1 can not logger format liveview projects #1110
Comments
I cannot reproduce that. Formatting a live_view project works on my machine. Note that there were no changes that could affect formatting between v0.22.0 and v0.22.1. Do you have a project that reproduces it reliably? |
Sure, please find the link below. I must add that for 1 second I thought that reverting to v0.22.0 and upgrading again to v0.22.1 solved the issue but removing Here is the full output I'm having :
And here is the reproduction repo. It's a freshly generated liveview app with nothing special. |
@NoBrainSkull Formatting works for me with your repo. Tested on macOS VSCode v0.22.1, elixir 1.17.2, OTP 26 |
Well I guess the problem is on my end then... For the records, I'm using neovim and installed elixir-ls through Mason. I do have the problem but I'm fine staying on the v0.22.0 for now. I suggest closing this issue and maybe reopening if someone else has a similar problem ? Thank you for your time ! |
I'm also getting the same error at times, and it randomly goes away |
I'm also getting an error on neovim (Lazy). Removing the plugin fixes the issue.
Elixir Language Server version: v0.22.1 |
getting the same error Also getting it for projects with older versions of LiveView. Error disappears if I uninstall the extension. |
I was also experiencing this with Funnily enough, just leaving the editor open for a few minutes resolved the issue. I guess it was compiling, but each interaction was interrupting the process. I confirmed that edit: Confirmed that deleting |
I've also been experiencing this issue off and on (in vscode). Sometimes the formatter fixes itself; other times it'll stay broken for days. The best way I've found to fix it when it does remain broken is:
Seems like maybe |
Had the same issue with |
Just adding in I had this for weeks. Elixir 1.17.2, OTP 27. Tried installing older versions, uninstalling, reinstalling. Nothing worked. Eventually I uninstalled, trashed the .elixir_ls folder, reinstalled an older version and then upgraded and it worked! |
I have the same issue with VSCode, ElixirLS 0.23.0, Elixir 1.17.2, and OTP 27. I tried some of the solutions presented here but none worked for me. However, sometimes just leaving VSCode open resolves the issue as some already pointed out. One weird thing is that I have the VSCode plugin v0.23.1 but the language server is 0.23.0, I'm not sure what is going on there.
Elixir Language Server version: v0.23.0 |
This is correct. Plugin versioning is independent from language server versioning. |
Same error :
Erlang/OTP 26 Fixed after following this post on Elixir Forum :
|
I'm going to close this as there's a confirmed workaround |
@lukaszsamson This needs a proper fix. |
Agreed @anildigital please send a PR or a reliable repro. |
I think I found a reliable repro, it feels like a race condition:
|
@sabiwara The formatter cannot work until the first build finishes. Formatter API can under that conditions initiate compilation which would conflict with the ongoing compilation. You wouldn't normally run |
Maybe the issue is for big projects for which the compilation is slow, and every new save will trigger a new compilation, delaying the formatter being available? |
It's not trivial to separate |
Reports on forum thread started on August 22 a few weeks after v0.23 release, but this post states that v0.20 worked OK |
Anyone already fixing this somewhere? Any woraround to avoid this error? thanks |
Just commenting here to say that I have the same issue |
I started seeing this today, after a machine crash. 1.17.2 elixir, latest ElixirLS in VSCode.
Cheers |
Environment
Tested with both :
and
Current behavior
Calling the LSP format function will fail with the following :
For some reason, the
&Code.ensure_loaded?/1
call in the&load_plugins
function returns false for theLiveView.HTMLFormatter
in this versionExpected behavior
Reverting
elixir-ls
to v0.22.0 fixes the problem entirely, with no observed impact from Elixir/OTP version.The text was updated successfully, but these errors were encountered: