Skip to content

[validation] Spring Boot support range validation messages appear and disappear again #887

Closed

Description

@martinlippert

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.

Activity

  1. added
    for: vscode
    on Nov 10, 2022
  2. added this to the 4.17.0.RELEASE milestone on Nov 10, 2022
  3. added a commit that references this issue on Nov 15, 2022
  4. nierajsingh commented on Nov 15, 2022

    @nierajsingh
    Collaborator

    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.

  5. BoykoAlex commented on Nov 16, 2022

    @BoykoAlex
    Contributor

    I think this is fixed

  6. martinlippert commented on Nov 17, 2022

    @martinlippert
    MemberAuthor

    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
  7. BoykoAlex commented on Dec 3, 2022

    @BoykoAlex
    Contributor

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

for: vscodetheme: refactoringtype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions