Skip to content

Outline View is broken again on Windows #742

Closed

Description

@mygithubdevaccount

Describe the bug

  • Symbols are not shown in the Outline view
  • Searching for Spring Symbols (Ctrl+Shift+O) is also not working

To Reproduce

  • Create a simple Spring Boot project with Spring Initializer
  • Select a Spring annotated class
  • At first symbols show up for a brief moment then they disappear and never come back
  • Restarting the language server does not help

Important

Sample

test

On Ubuntu symbols show as expected:

ubuntu

I'd be happy to provide any log files or further information.

Additional Info
OS: Windows 10
VS Code: 1.65.0
Java Extension (Lanugage Support): 1.4.0 (March 3rd, 2022)
Spring Boot Tools: 2022-02-02 (4.13.1 RELEASE, incl. language servers version 1.30.0)
JDK: openjdk 17.0.1 2021-10-19

Activity

  1. mygithubdevaccount commented on Mar 6, 2022

    @mygithubdevaccount
    Author

    log.txt

    I have attached the log file. No error messages visible.

  2. added this to the 4.14.0.RELEASE milestone on Mar 8, 2022
  3. BoykoAlex commented on Mar 8, 2022

    @BoykoAlex
    Contributor

    Seems like a VSCode bug to me (raised microsoft/vscode#144698). The doc URI from vscode-languageclient comes in with escaped drive colon which seems wrong to me:

    [Trace - 12:35:52 PM] Sending request 'textDocument/documentSymbol - (22)'.
    Params: {
        "textDocument": {
            "uri": "file:///c%3A/Users/sasha/Documents/workspace-spring-tool-suite-4-4.9.0.RELEASE/spring-petclinic/src/main/java/org/springframework/samples/petclinic/owner/PetRepository.java"
        }
    }
    
  4. BoykoAlex commented on Mar 8, 2022

    @BoykoAlex
    Contributor

    Likely that downgrading VSCode to older version would fix this... I saw the issue in 1.63 too though...

  5. BoykoAlex commented on Mar 8, 2022

    @BoykoAlex
    Contributor

    Fixed on Spring Boot LS side: 58f4300

  6. mygithubdevaccount commented on Mar 8, 2022

    @mygithubdevaccount
    Author

    It's really wired. Sometimes (I've deleted the symbol cache and restarted VSCode) then after a while the symbols come back. But when I try to edit the file they disappear again:

    bug

    The Symbol cache JSON file has both c%3A and C: entries. But works (when it works) for both of them.

  7. mygithubdevaccount commented on Mar 8, 2022

    @mygithubdevaccount
    Author

    I have compiled your commit myself. Two observations:

    a) This does not solve the bug. Unfortunately the bug is much more complex it seems.
    b) The symbolCache file has no c%3A escaped entries anymore, but that was not the cause of the bug unfortunately

  8. BoykoAlex commented on Mar 10, 2022

    @BoykoAlex
    Contributor

    Looks like we misunderstood how doc symbols are supposed to work...
    We update the doc symbol index after file is saved. However, when file is saved doc symbols view is not refreshed. Doc symbols view (the Outline) is refreshed on document changes, i.e. when user types. Therefore, I suppose if you enter a new endpoint, save the file and then press space or enter key while still in the editor you may see the correct doc symbols. The same issue is present on other platforms.

  9. BoykoAlex commented on Mar 10, 2022

    @BoykoAlex
    Contributor

    Should be fixed now with d350da5

  10. mygithubdevaccount commented on Mar 17, 2022

    @mygithubdevaccount
    Author

    Should be fixed now with d350da5

    It does indeed. Thank you very much

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

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions