-
Notifications
You must be signed in to change notification settings - Fork 333
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
Metals not starting when power directives like dockerFrom is in the code #6772
Comments
Thanks for reporting! I can't seem to reproduce the issue. Are you maybe able to get stack traces of the metals process? |
Hi @tgodzik |
I don't see anything wrong in the logs. Would it be possible for you do get stack traces via I am looking into other possibilities. Also, are you using power option? You could add |
Here is the bsp trace content:
I also tried with the power options.
But after these changes, the program is not running
So I cleaned it up using |
Just an update: But attaching the logs in case something makes sense: |
This is quite curious: Looks like Metals was unable to start Scala CLI. Maybe it had the executable cached somehow and it got removed/reinstalled in the meantime? Did you change anything recently? Though why would it be influenced by the docker directive 🤔 Does bsp.trace only contain the first message as you pasted above? |
Anyway, do let me know if that happens again. We could not reproduce on any of our machines. |
I havent made any changes recently. Here is the bsp trace file |
Would be great to compare both using a diff of some kind to see what exactly is different. |
which two files? |
I would say the whole dirs if possible, not exactly sure which file might have caused it. Though I would rather bet on the json files inside scala-build/.bloop |
I have multiple scala-cli projects at work. When I added the docker directive, all those projects stopped working correctly in metals. I am not sure what is going wrong! |
Maybe the problem is not exact directives but the order of adding them? 🤔 |
Btw. Are you using Metals 1.3.3 ? Could you try with a newer version like |
I again cleared the metals log. Cliecked on import, compile and connect to build server.
|
Ach sorry, the first metals.log mentioned 1.3.3. That looks like we are connecting, but the bsp server is processing something internally. Is the bsp.tace.json the same as previously? We might need to find the bsp server process and jstack it. I still can't seem to reproduce. |
Right now, it stopped working even without those directves.
Even this code doesn't work now |
I cleaned up everything, killed all java processes. Still it is not working. I see this log in the metals doctor. What does this mean?
|
Looks like Scala CLi is not returning any build targets, so it seems to be hanging somewhere. Is there any additional process started aside from Bloop and Metals? The jstack you sent is Bloop server itself and everything seems to be ok there. |
I had killed all java processes and started the metals again in the same dir. Now I can see 2 java processes running.
|
@tgodzik |
Describe the bug
EmailClient.scala
Main.scala
Open this directory in vscode and try to start the metals. It doesn't start. You will get the error in the metals.log
Auto completion will not work but the code runs fine through command line.
If you remove the docker directive, metals will start and everything works fine.
Also, if there is only single file, then also no issues with this directive. The problem comes only with the combination of file directive and dockerFrom directive.
Expected behavior
It should be able to work normally
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
1.3.5
Extra context or search terms
This is Mac M3, if that is relevant.
The text was updated successfully, but these errors were encountered: