-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add options for import java.compiler module #1395
Add options for import java.compiler module #1395
Conversation
8941b7e
to
bc36900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well!
I just submitted a minor fix onto your branch - I realized that we actually have an actual javaHome and there is no need to extract it back from env.
serverOptions - pass javaHome explicitly
@ckipp01 @ayoub-benali - Hey! Could you say if you will be able to port changeset from this PR for nvim and sublime? |
Thanks for the ping @dos65! I haven't been following the work on the Java hover pr, but how come this is actually necessary? I don't mean why are the extra flags necessary, but how come they need to be used to start Metals? I was under the assumption that when Metals started the java compiler or whatever was being used it could pass in those flags so the client doesn't need to worry about them. Is that at all possible, or is absolutely necessary that Metals is started with those flags? To answer your original question, I think this should be portable, I just need to rewrite it in lua for nvim-metals. |
Hey @dos65, from my understanding a set of flags are passed to the client if java_home is 17 or above. It shouldn't be a problem to do that for sublime |
Yep, unfortunately it's necessary. It doesn't affect Metals startup but in runtime for jdk17 there will be errors in case of JavaPC execution. We can't pass there flags as JavaPC is not a separate process, Metals runs it in the same way as ScalaPC. I theory there is an option to make some kind |
This reverts commit cf748dd.
Revert "Add options for import java.compiler module (#1395)"
This changes related to Java Hover for Metals. It's required to export
java.compiler
module manually for Java version greater than 17. I've handled version of Java like it's made in Metals.