metals
metals copied to clipboard
Go To Definition and Go To Implementation not working properly
Describe the bug
In the following code in Scala 3 Completions file, we have the following problem on the toString
method of Symbol.Symbol
https://user-images.githubusercontent.com/109077949/181247893-630530b5-cd5a-422b-9e01-901cf76ddb93.mov
:
Expected behavior
No response
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
0.11.7+61-a6299f3a-SNAPSHOT
Extra context or search terms
No response
Looks like it's the same issue as was fixed in https://github.com/lampepfl/dotty/pull/15536
We can confirm when we update metals to 3.2.0
One extra case to check
One extra case to check
That is unrelated, but it does work for me. It needs the code to compile though.
One extra case to check
That is unrelated, but it does work for me. It needs the code to compile though.
I ran the tests, so it is compiled. I wonder why it is not working on my side.
By the way, I guess it would be cool if we add a trouble shoot tutorial in the docs.
I ran the tests, so it is compiled. I wonder why it is not working on my side.
Where did you run the tests though? IF from test explorer then it can't work without semanticdb, which seems to be the case here
Where did you run the tests though?
sbt
Where did you run the tests though?
sbt
Yeah, sbt compilation is unrelated unless you use sbt server. If you use Bloop it probably didn't compile. Maybe something is shown in the problems view?
Yes, 66 problems
the problem might be Bloop
Try Clean compiler workspace command
Try Clean compiler workspace command
after running sbt clean
followed by sbt compile
, the problems number increased to 227.
Same with Clean Java Language Server Workspace
command.
@vzmerr this clean command is located in Metals ta
@vzmerr if you are using sbt extensively you may consider switching build server to sbt
@dos65 thanks the problems got reduced to 3
@kpodsiad
if you are using sbt extensively you may consider switching build server to sbt
how do I do that?
The standard way of using Metals is with Bloop, though. So I guess for the sake of revealing the functionality of Metals from the user perspective, I have to stick to Bloop.
@vzmerr you need to trigger compilation once from sbt - BuildInfo
is a generated source and only sbt can generate it
@vzmerr you need to trigger compilation once from sbt -
BuildInfo
is a generated source and only sbt can generate it
But I did so. I ran the test.
I think I really have to make a troubleshoot doc PR
The issue got solved by deleting the .bloop
directory and then compiling and importing build. credit to @dos65
Also, with the newest work of Vadim on Bloop, this issue might not be encountered by users again :)
The issue got solved by deleting the
.bloop
directory and then compiling and importing build. credit to @dos65 Also, with the newest work of Vadim on Bloop, this issue might not be encountered by users again :)
I mean the Problems view issue, not the javadoc on hover one.
Now Scala 3.2.0 is released https://github.com/lampepfl/dotty/pull/15536 closing, if there're remained issues related to this, feel free to open a new one :)