"A severe compiler error occurred" just by clicking around
durban opened this issue · comments
Describe the bug
Sometimes autocomplete and highlighting the usages of the definition under the cursor stops working. Unfortunately, I can't reliably reproduce, but sometimes happens even when I'm just clicking on definitions in the source. In the log there is this:
Apr 16, 2024 1:09:10 AM scala.meta.internal.pc.CompilerAccess handleError
SEVERE: A severe compiler error occurred, full details of the error can be found in the error report .../choam/.metals/.reports/metals-full/2024-04-16/r_compiler-error_(core)_01-09-10-138.md
Here is the .md file referred to above: r_compiler-error_(core)_01-09-10-138.md.
Expected behavior
No "severe compiler error".
Operating system
Linux
Editor/Extension
VS Code (VSCodium 1.86.2)
Extension version: v1.30.0
I'm using the "sbt" build server (selected with "switch build server").
Version of Metals
1.3.0 (but also used to happen with 1.2)
Extra context or search terms
scala.reflect.internal.FatalError: class Object does not have a method getClass
Closing and relaunching vscode fixes the problem (for a while).
Thanks for reporting! Is this a public repo this happened on?
Yes, it's this one: https://github.com/durban/choam.
Also: I've reconfigured the JVMs used with the new metals.javaVersion
and metals.javaHome
settings to both use 21, and since then I've not seen this error. I haven't used it a lot since, but I'll continue watching, and will comment here.
Doesn't seem to happen to me, would be great to see what Java was being used, what was being compiled before etc. Anyway, there is another issue that this already tracked under, so let's close this one.