-
Notifications
You must be signed in to change notification settings - Fork 352
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
Missing error message when running Java 11 #582
Comments
I was able to reproduce this behavior on macos. In my case I had an external drive mounted at /Volumes/drive, and symlinked into my home at ~/drive. Launching atom from a project in the symlinked directory would recreate this behavior for me. Referring to the project through the canonical /Volumes/drive version alleviated the problem. I did not test symlink only to verify if that's the problem or if symlink to a mount is the issue. |
also @olafurpg, given the same constraints I was not able to reproduce in vscode, since that's what your gif shows. So it seems to be specific to atom and it's interaction with metals. OP is also using atom. |
@theqabalist do you use sbt to generate bloop? if so it might be related to sbt/sbt#4552 |
I tried it on the referred project and it worked for some subprojects, for example:
I don't think it's an Atom-specific problem. |
@cquiroz in what source file does navigation not work for you? This might be an issue in sbt-bloop not detecting the declared sbt projects. I notice for example that build.sbt doesn't explicitly bind Code navigation for cross-built projects is also not well supported, there is a feature request about it here scalameta/metals-feature-requests#13 |
@olafurpg For example I don't get navigation on files on the module That module is jvm only (btw it has some java files, perhaps that is the reason) |
@cquiroz I am unable to reproduce in Atom, navigation works fine for me in |
I did a deep review reinstalling and installing stuff and I think I found the reason. I installed OpenJDK 11 a while ago and forgot about it. I use 1.8 normally on the shell but I think Atom was still picking 11 and that failed Thanks for checking this. Would it be good to add this to the documentation (maybe it is already there) |
The server reports an error using def isUnsupportedJavaVersion: Boolean =
scala.util.Properties.isJavaAtLeast("9")
def warnUnsupportedJavaVersion(): Unit = {
if (isUnsupportedJavaVersion) {
val javaVersion = System.getProperty("java.version")
val message =
s"Unsupported Java version $javaVersion, no functionality will work. " +
s"To fix this problem, restart the server using Java 8."
languageClient.showMessage(new MessageParams(MessageType.Error, message))
scribe.error(message)
}
} when trying to connect to the build server. I wonder how we can make the message easier to discover 🤔 |
I don't recall seeing that. I got this message that got me thinking
|
I just tried running Metals with Java 11 and got the following error
Please reopen if you are able to provide a reproduction where Metals running on Java 9+ does not show that message. |
Describe the bug
On a certain project, I use metals and while metals/bloop can install and run successfully the editor cannot navigate nor shows all errors.
Looking at
bloop projects
we can see the projects and metals log shows a successful import. However metal doctor looks empty and when trying to navigate it shows messages like:WARN code navigation does not work for the file '/Users/cquiroz/Projects/ocs3/modules/seqexec/server/src/main/scala/seqexec/server/SeqexecEngine.scala' because it doesn't belong to a build target.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Metals working correctly
Screenshots


Installation:
Additional context
Gitter discussion:
https://gitter.im/scalameta/metals?at=5c8fadf49d9cc8114adece33
Search terms
navigation, metals
The text was updated successfully, but these errors were encountered: