You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[validation] Spring Boot support range validation messages appear and disappear again #887
I tried to convert Petclinic to Spring Boot 3 in VSCode (using the latest Spring Tools CI builds) using the OpenRewrite recipes from the command palette. The conversion itself seems to work fine, although looking at the problems view in VSCode while doing that reveals some strange things.
Among them, I can see (after clicking the button to update the project config in the popup that appears after the project files got changed) some INFO messages appear in the problem view about the Spring Boot support ranges, but those info messages also disappear again. I am not sure why they appear and disappear. They were not in the problems view before the conversion to Spring Boot 3.
I am not exactly sure whether the validation itself works correctly here or not, but I am worried about those info messages (whether correct or not) are appearing and disappearing. It feels to me like a more fundamental problem of those diagnostics being overridden or deleted in some situations (or something like that). We should investigate this.
Pushed fix for the appearing/disappearing marker. Seems the problem was when finding the build file in the java project. Sometimes it was finding the file under /target, which would result in the wrong file being marked, those causing it to "disappear" from the actual file.
Looks like this is not really fixed yet, here is what I observe using the latest from the nightly builds (all in VSCode):
I open a project (simple demo project, boot version 2.7.2)
no editors are open, I don't see anything in the problems view yet (I guess this is due to the lack of starting up the language server early, so expected behavior)
I open a Java source file, the validations for the boot version appear (in the problem view), since I have switched the preferences upfront to show stuff as warnings and info, not "hint".
Then, I open the pom.xml file
All the boot version validations disappear from the problems view
I change the boot version in the pom.xml file to 2.7.1, the popup from the java tooling appears to update the project config, and I press Yes
After a little while (maybe 1sec), I see the boot version markers appear in the problems view, but they disappear again very quickly
They appear again, then disappear again (very quickly)
The problem view stay empty
Now trying to get the boot version markers back into my problems view, so trying things:
close the pom.xml file -> nothing changes, still empty problems view
the java source file editor is now open again, still empty problems view
type something into the java source editor (just a space), the boot version markers appear after a short little while (maybe 1sec) and they stay in the problems view
Now trying to make them disappear again:
open application.properties file -> markers stay around in problems view
closing editor, going back to java source editor, markers stay around in problems view
open editor for HELP.md file, markers stay around in problems view
open random editor for random files, markers stay around
as soon as I open the pom.xml file, the markers disppear
@martinlippert I haven't had great success reproducing this issue. However, I have noticed that our Spring XML server component reconciles XML files it is not supposed to even if XML support is off. Therefore, I've excluded pom files from Spring XML reconciler as well as let it observe the preference setting when about to reconcile. These changes resulted in version validation to remain during the file editing which probably means it should fix it.
See 040da34
Activity
GH-887 Fix appearing/disappearing validation marker
nierajsingh commentedon Nov 15, 2022
Pushed fix for the appearing/disappearing marker. Seems the problem was when finding the build file in the java project. Sometimes it was finding the file under /target, which would result in the wrong file being marked, those causing it to "disappear" from the actual file.
BoykoAlex commentedon Nov 16, 2022
I think this is fixed
martinlippert commentedon Nov 17, 2022
Looks like this is not really fixed yet, here is what I observe using the latest from the nightly builds (all in VSCode):
pom.xmlfilepom.xmlfile to2.7.1, the popup from the java tooling appears to update the project config, and I pressYesNow trying to get the boot version markers back into my problems view, so trying things:
pom.xmlfile -> nothing changes, still empty problems viewNow trying to make them disappear again:
application.propertiesfile -> markers stay around in problems viewHELP.mdfile, markers stay around in problems viewpom.xmlfile, the markers disppearBoykoAlex commentedon Dec 3, 2022
@martinlippert I haven't had great success reproducing this issue. However, I have noticed that our Spring XML server component reconciles XML files it is not supposed to even if XML support is off. Therefore, I've excluded pom files from Spring XML reconciler as well as let it observe the preference setting when about to reconcile. These changes resulted in version validation to remain during the file editing which probably means it should fix it.
See 040da34