scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.1k stars 333 forks source link

bugfix: Use metals Java versions as default #6721

Closed tgodzik closed 2 months ago

tgodzik commented 2 months ago

Some distributions seem to require this to work, so it's safer to include it by default.

I reworked it, since the problem was actually different, we used wrong Java home, which might have been older.

tgodzik commented 2 months ago

This might actually not be needed, I need to confirm.

tgodzik commented 2 months ago

Ok, now it's ready. The issue was that if a user has an older JVM set for javaHome we would try to use it for Bloop, which would not work.

tgodzik commented 2 months ago

Right... So where is the java set by the user passes to bloop? I guess it should be done via JAVA_HOME.

That will be set when importing the build. Bloop itself should not run with JDK from the project. IT should be either JAVA_HOME or the same Java as metals.