-
Notifications
You must be signed in to change notification settings - Fork 337
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
Can't navigate more levels of source code #606
Comments
Thanks for reporting! This is expected behavior with the latest release as explained by the " Navigation for external library sources is not supported in Scala 2.11.12." error message. This has been fixed in the latest SNAPSHOT, which you can try out with instructions here https://scalameta.org/metals/docs/editors/vscode.html#using-latest-metals-snapshot |
Great ! Thank you, I can navigate correctly now |
I have a very similar problem in my current remote development setup (client on windows, actual code on linux, via vscode ssh remote development): My setup:
As described by the original post, I can navigate from my own scala source files into any library (scala/java). In those libraries, navigation does not work at all. I do not see any warnings, though. |
@romankarlstetter could you try the newest snapshot? There might be some things fixed there, I did a refactoring around dependency sources. |
Thanks for the quick answer. I just tried with snapshot version |
I can navigate without na issue, is there anything in the logs? Could report a new issue with some reproduction information and the steps that you are following? |
I just tried to come up with a smaller example to reproduce the issue and then noticed that navigation in scala dependencies actually works fine. Only navigating java dependencies does not work (I tried with a new flink project, see here), even though opening them via F12 does work . |
Navigating java dependencies is not supported unfortunately. There might be some work done that unblocks it, but until then you can subscribe to scalameta/metals-feature-requests#5 |
hi @tgodzik,
then trying to navigate in Spark project https://github.com/apache/spark.git |
@wpopielarski it seems spark doesn't properly compile with Bloop:
You might try with sbt build server. |
Or you could try importing the project via sbt instead of maven, that seems to also work. Might be a bug in the Bloop maven plugin. |
I owe you if you could give me some advices how to use sbt to import maven projects. Any recipe how to do it welcome. Spark is big project with many modules so hacking every module seems to be very painful at first glance of eye. About switching build server:
info given by metals I found that Spark uses sbt 0.13.18 in project/build.properties. Let me try to bump it up to 1.4.1 OK, I checked it and situation is rather hopeless in term to use sbt build server. There is too many dependencies to plugins which work with sbt 0.13.x and there are no versions for sbt 1.x and look somehow stale and not maintained. |
Ach, so build server here is a no go, but since it is actually an sbt project you should be able to import the build definition from sbt, which I checked works ok. You can run a commad |
I know Doctor and used id and only for oldDeps module are some warnings. Strange thing for me is that I see some symbol like class (of module A) unrecognised in file in module B but inside module A this symbol is recognised and navigation possible. Anyway I get it is subtle problem so don't want to nag you too much |
Describe the bug
The Scala goto function work correctly, but I can't navigate more than one level of code source.
To Reproduce
Steps to reproduce the behavior:
In lsp.trace.json i find many errors messages :
Expected behavior
I should be able to navigate scala source code or any dependency without problems.
Screenshots
Installation:
Additional context
Search terms
vscode, metals, sbt,
The text was updated successfully, but these errors were encountered: