-
Notifications
You must be signed in to change notification settings - Fork 194
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
Error - Cannot format file from current directory (Currently in deps/telemetry/deps/mimerl)") #252
Comments
My thinking on how to handle this is to try to get the build lock, but if that takes more than 1 second or so, then just save the file without formatting. |
It's also happening to me, but instead of changing the cwd to deps it's changing to a random app inside the umbrella. |
I found it sometimes after build is done. This is trace output from
It's seems like the build is broken some how and does not change directory back to project dir. |
Anyone know how is this handled in VS Code? I have not seen such error there. |
I found that the formatter will return this error when ElixirLS are still compiling the source. If your source contains small dependencies. I guess that we cannot get formatter opt during mix still compiling. |
Not sure if it is related, but I can see this message in my ElixirLS - server log of VSCode too.
Steps to reproduce:
I am not sure if formatting should work for unsaved file too, but I would assume yes. Correct me if I am wrong, please. |
@stefanluptak this looks like a separate issue |
Addressed in #890 |
If I change and save too fast. I see this error
Environment
Elixir & Erlang versions (elixir --version):
Erlang/OTP 22 [erts-10.7.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.10.3 (compiled with Erlang/OTP 21)
Operating system: macOS Catalina 10.5.4
Editor or IDE name (e.g. Emacs/VSCode): Emacs 27.0.91
LSP Client name: elixir-lsp elixir-ls
Logs
The text was updated successfully, but these errors were encountered: