-
Notifications
You must be signed in to change notification settings - Fork 339
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
How to handle "Could not load snapshot text for XXX" warning? #7064
Comments
this problem is also encountered in IntelliJ IDEA + LSP4IJ plugin:
could be easily reproduced on a sample project: https://github.com/tribbloid/scaffold-gradle-kts/tree/b421ae8cb778affaf3759a9b79b9462e161dd9ed |
LSP appears to have invoked gradle-bloop 1.6.2 before launching, could it be where problem come from? |
That should not be the problem, this only happens if the currently compiled semanticdb is not generated from the current file. My guess is that this might be caused by checking out a different branch and code not compiling anymore. In that case if the file was never opened we never did save the text used for semanticdb. I need to make it more foolproof, since this logic seem quite flaky. This should go away once the code is fully compiled, but we do have some fallbacks so this should no longer be that big of an issue. |
ah that explained it, almost forgot that Scala 3 best effort compilation feature is not available for Scala 2 in this case it should be swept into the backlog |
We should only print this warning if none of the fallbacks worked, or better yet create a report for the user to bring to us. The current warning is less than useful |
Describe the bug
When trying to compile a Scala 2 project:
https://github.com/tribbloid/prover-commons
I got a lot of errors like this:
What does it mean? How to fix it?
Expected behavior
Should load snapshot text, or at least direct user on how to find it
Operating system
Linux
Editor/Extension
VS Code
Version of Metals
1.4.2
Extra context or search terms
No response
The text was updated successfully, but these errors were encountered: