Describe the bug
Metals caches path to java in ~/.bloop/bloop.json and then uses it to start bloop. It's not always correct thing to do. For instance, in NixOS I get the following value of this file: {"javaHome":"/nix/store/mir2hanra9zc3cmn8h78insschpxdg0i-openjdk-17.0.3+7/lib/openjdk"}, i.e. it cached path to nix store which might change after NixOS update. This leads to the error java.io.IOException: Cannot run program "/nix/store/h6f224sdr2iqmcscrbywylsr9q2qhj7m-openjdk-17.0.3+7/lib/openjdk/bin/java" when starting metals.
Expected behavior
No response
Operating system
Linux
Editor/Extension
Emacs (lsp-metals)
Version of Metals
0.11.6
Extra context or search terms
nixos java bloop
Describe the bug
Metals caches path to java in
~/.bloop/bloop.jsonand then uses it to start bloop. It's not always correct thing to do. For instance, in NixOS I get the following value of this file:{"javaHome":"/nix/store/mir2hanra9zc3cmn8h78insschpxdg0i-openjdk-17.0.3+7/lib/openjdk"}, i.e. it cached path to nix store which might change after NixOS update. This leads to the errorjava.io.IOException: Cannot run program "/nix/store/h6f224sdr2iqmcscrbywylsr9q2qhj7m-openjdk-17.0.3+7/lib/openjdk/bin/java"when starting metals.Expected behavior
No response
Operating system
Linux
Editor/Extension
Emacs (lsp-metals)
Version of Metals
0.11.6
Extra context or search terms
nixos java bloop