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
Gradle project infinitely rebuilds after launching a project #4307
I have a multi-project Gradle project. It is not using any Eclipse settings (meaning no .project, .classpath, etc. files). The projects uses annotation processors to generate source files (they are generated under build/generated/sources/annotationProcessor/java/main by Gradle).
When the workspace is initially loaded, it works fine. The problems start after you launch a Java main class. It appears that the language server is constantly detecting changes in source files and somehow falls into an infinite loop where it continuously builds itself. It gets so bad that the workspace starts reporting compiler errors, even though there are none.
I'm not sure which factors are causing this issue to happen, so I can't provide a project that reproduces the issue. It might be a combination of Gradle with sub-projects, annotation processors, and the sheer size of the codebase. I tried changing some settings that I thought might be related to this issue with no success. I tried the current and pre-release Java Language Pack versions and the behavior is the same.
Attached are the language server logs. jls_before_run.log are the logs before I launched a main class. jls_after_run.log are the logs after I launched a main class. jls_after_run.log would have run into infinity, so I had to eventually manually stop it, so I hope there's enough information to get a clue on what's happening.
Found a temporary workaround for this issue. I can manually launch the process in an external terminal, and attach the debugger via the "request": "attach" launch configuration. Launching with "request": "launch" triggers this bug.
That seemed to work. I had to set java.import.gradle.annotationProcessing.enabled to true so the generated source files will be generated/discovered, disabled vscode-gradle, cleaned the workspace, ran a "request": "launch" Java launch command, and did not encounter the infinite rebuild problem.
Hi @ChrisTrenkamp we've found the root cause. It’s a bit complex, so we focused on fixing the essential rebuild logic first in this new release. Could you please verify it with this version? Thank you! vscode-gradle 3.17.2026040802
Activity
ChrisTrenkamp commentedon Jan 13, 2026
Toggling
java.import.gradle.annotationProcessing.enabledhas no effect.ChrisTrenkamp commentedon Jan 14, 2026
Both Windows and Linux exhibit the same behavior.
ChrisTrenkamp commentedon Jan 14, 2026
Found a temporary workaround for this issue. I can manually launch the process in an external terminal, and attach the debugger via the
"request": "attach"launch configuration. Launching with"request": "launch"triggers this bug.fbricon commentedon Jan 14, 2026
can you try to disable the vscode-gradle extension and run the "Clean Java Language Server Workspace" command?
ChrisTrenkamp commentedon Jan 14, 2026
That seemed to work. I had to set
java.import.gradle.annotationProcessing.enabledtotrueso the generated source files will be generated/discovered, disabledvscode-gradle, cleaned the workspace, ran a"request": "launch"Java launch command, and did not encounter the infinite rebuild problem.wenytang-ms commentedon Apr 8, 2026
Hi @ChrisTrenkamp we've found the root cause. It’s a bit complex, so we focused on fixing the essential rebuild logic first in this new release. Could you please verify it with this version? Thank you!
vscode-gradle 3.17.2026040802