-
Notifications
You must be signed in to change notification settings - Fork 21
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
scala.reflect.internal.FatalError: class Object does not have a method getClass #13045
Comments
So we fail in
where I have to look a bit closer how But if "Restarting the presentation compiler doesn't help" that sounds like a different cause... |
I started getting it more often now, so I will try and connect debugger again. |
Which repo..? Does it happen randomly, or only after longer sessions? |
In the scalameta/metals repository, but some people reported it happen in other repositories. It seems to happen quite randomly, but at that point everything is broken. Might be connected to regenerating bloop config or switching branches a lot, but I could not make it reliably reproduce |
Ok it seems, everything in |
Seems possible.. It still didn't reproduce for me. Being able to debug it would be great.. |
I am trying out to run Metals on the same version as the project version to see if the problem ever happens without |
Ok, so this is reproducible when -release flag is added, but it takes a while sometimes to happen. I will probably try some workarounds. Btw. any idea where types might break when using -release? I can try to debug those places. |
I noticed some issues with Scala 2.13.15 and I am not sure how to work around it. This can be worked around if the user needs it as Metals does work with 17 and up. For reference: - scala/bug#13045 - scalameta#5272
I think this only happens with The way to reproduce it locally if anyone has the time would be to do:
though I haven't managed to do it reliably. |
And also filter out if it exists. I noticed some issues with Scala 2.13.15 and I am not sure how to work around it. This can be worked around if the user needs it as Metals does work with 17 and up. For reference: - scala/bug#13045 - scalameta#5272
And also filter out if it exists. I noticed some issues with Scala 2.13.15 and I am not sure how to work around it. This can be worked around if the user needs it as Metals does work with 17 and up. For reference: - scala/bug#13045 - scalameta#5272
And also filter out if it exists. I noticed some issues with Scala 2.13.15 and I am not sure how to work around it. This can be worked around if the user needs it as Metals does work with 17 and up. For reference: - scala/bug#13045 - scalameta#5272
And also filter out if it exists. I noticed some issues with Scala 2.13.15 and I am not sure how to work around it. This can be worked around if the user needs it as Metals does work with 17 and up. For reference: - scala/bug#13045 - #5272
I did a workaround and now we remove -release flag for 17 and higher. Looks like that is the main culprit. |
Doesn't this lead to inconsistencies? E.g., when running on 21 with a project that uses I was hoping to take a look at this one but didn't yet manage to reproduce, and I don't have much time currenlty... |
It will show inconsistencies, but it's better than not showing anything at all 😅 No worries, it's a really weird one to reproduce, if you are able to point me to a specific part of code that might be responsible I can also just try to debug it myself once it breaks |
I have a suspicion that we have a similar issue in Scala 3 scala/scala3#21947 Looks like that happens especially when compiling scala CLI from command line and from Metals at the same time. Though this should not happen, but is it possible that the state gets somehow corrupted? |
I am raising it here because I have no idea how this can happen. Restarting the presentation compiler doesn't help only restarting the whole JVM does. It's also not possible to reproduce it reliably.
What is more when debugging I managed at some point to find that getClass did exist, but it had no flags at all. Anyone has any idea how it's possible? Any hints or debugging advice would be welcome
Reproduction steps
I can't reproduce it reliably and it seems to happen more often a time especially on latests metals with 2.13.15.
Problem
Presentation compiler stops being possible to use
Error stacktrace:
scalac options
classpath
More about it in scalameta/metals#5272
The text was updated successfully, but these errors were encountered: