Skip to content

Detect updated JAVA_HOME and modify bloop configuration accordingly #456

@here-abarany

Description

@here-abarany

Is your feature request related to a problem? Please describe.

When updating the Java installation location, the bloop configuration retains the original installation path, causing the build to fail the next time the project is opened.

Describe the solution you'd like

Detect when the Java installation path changes, either with an explicit user/workspace config or implicitly through JAVA_HOME, and update the bloop configurations accordingly.

Describe alternatives you've considered

Deleting the .bloop, .metals, and target folders throughout the source tree to fully reset the Metals project. This may require going through multiple sub-directories (e.g. the project folder for an SBT project) to get all of them.

Additional context

This is very common to occur on Windows, since the JDK installation location typically includes the full semantic version. In other words, even a small update that simply increments the patch version will cause the installation location to change, and break any projects using Metals.

Search terms

JAVA_HOME update

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions