sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

Spring Boot Tools for VS Code shows unhelpful/incorrect warning

Open Herohtar opened this issue 4 years ago • 3 comments

Expected Behavior

Spring Boot Tools should show a more informative warning when Java components are missing, or not show a warning at all if functionality is not actually affected.

Current Behavior

Currently, Spring Boot Tools will show the following warning message if the jmods component for Java is not installed, even if JAVA_HOME and/or PATH are pointing to the correct JDK location:

JAVA_HOME or PATH environment variable seems to point to a JRE. A JDK is required, hence Boot Hints are unavailable.

Installing the jmods component causes the message to go away. (eg, on my CentOS 8 system that involved installing the java-11-openjdk-jmods package)

Context

The warning message is confusing, as the problem is not with JAVA_HOME or PATH at all, and results in a lot of wasted time trying to figure out what is wrong.

This has been reported here multiple times by other confused users (#576 and #347, for example).

Despite the warning, there doesn't seem to actually be any issues with the extension when jmods is not installed, unless I misunderstand what "Boot Hints" are -- I can't seem to find any documentation that actually mentions that.

If functionality is not affected, the warning should not be shown, otherwise the warning should be updated to explain what is actually being complained about.

Herohtar avatar Apr 06 '21 16:04 Herohtar

Hey @Herohtar, yeah, I agree, this needs some improvements. I will add it to our backlog for one of the next releases.

martinlippert avatar Apr 08 '21 09:04 martinlippert

@Herohtar

Despite the warning, there doesn't seem to actually be any issues with the extension when jmods is not installed

This is good news. Thanks!

wduminy avatar Apr 12 '21 09:04 wduminy

Despite the warning, there doesn't seem to actually be any issues with the extension when jmods is not installed

The functionality that would be affected is not everything but only the live hover hints that show information about live beans. So this may be something that isn't easy to spot (i.e. most of the functionality will still work and many folks may not care about the live hovers to notice their absence).

This is just for clarification, but I think we all agree the warning can be improved.

kdvolder avatar Apr 12 '21 18:04 kdvolder