Skip to content

Workspace Clean Hangs (either on startup or a forced clean) #2064

Closed

Description

@kjq

When working with either a single module or multi-module project VSCode will stall when "rebuilding the workspace" during startup or forced. Usually, this will stop at a specific point in the project.

The project is a straight-forward Quarkus project with Lombok and Mapstruct (annotation processing). When VSCode does work it works perfectly fine.

For whatever reason, this file org.eclipse.jdt.apt.core.prefs does not get created or gets created partially and copying the below properties into every .settings folder gets past it.

eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations

It is these lines that are missing:
org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations

Environment
  • Operating System: WSL2
  • JDK version: 15 (vscode) / 11 project
  • Visual Studio Code version: 1.59.0
Steps To Reproduce
  1. Open a single module or multi-module project
  2. Remove the file above if it exists and see it stall or it just stalls naturally (cleaning the workspace or startup)
  3. Copy the file above into the .settings folder
  4. Close VSCode
  5. Restart

It will either get past initial stalling point and stop at another folder (if not copied into every folder) or succeed.

Current Result

Startup or cleaning the workspace hangs forever.

Expected Result

Workspace fully comes up.

Additional Informations

Logs provide no real details as to what is happening. The solution came about trying to diff a folder prior to stalling with the one that stalled. Sometimes the stall point is a false-positive and it a prior folder needs the update.

Lost many hours on this when it happens.

Activity

  1. kjq commented on Aug 17, 2021

    @kjq
    Author

    Maybe related/fixed by #2020

  2. fbricon commented on Aug 18, 2021

    @fbricon
    Collaborator

    Please check with the newly released vscode-java 0.81.0

  3. kjq commented on Mar 5, 2023

    @kjq
    Author

    Have not had this in a while.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions