Skip to content

perf: use incremental build by default#998

Merged
wenytang-ms merged 4 commits intomainfrom
feature/incremental-build-commands
Apr 28, 2026
Merged

perf: use incremental build by default#998
wenytang-ms merged 4 commits intomainfrom
feature/incremental-build-commands

Conversation

@wenytang-ms
Copy link
Copy Markdown
Contributor

@wenytang-ms wenytang-ms commented Apr 28, 2026

This updates Project Manager for Java so regular build actions use JDT LS incremental build by default, while keeping explicit full rebuild actions available.

Changes

  • Build All calls java.workspace.compile(false).
  • Build Project calls java.project.build(..., false).
  • Rebuild All calls java.workspace.compile(true) for CLEAN_BUILD + FULL_BUILD.
  • Rebuild Project calls java.project.build(..., true).
  • The default java (build) task now uses isFullBuild: false, and resolved tasks without isFullBuild also default to incremental.
  • The isFullBuild task schema default is now the boolean false.

Notes

The boolean build flag is passed through vscode-java to JDT LS:

  • false -> IncrementalProjectBuilder.INCREMENTAL_BUILD
  • true -> CLEAN_BUILD + FULL_BUILD

This change affects Project Manager build commands/tasks. It does not change Maven/Gradle external builds or the compiler backend selection (ECJ by default, experimental javac when enabled).

Fixes #878.
Related: microsoft/vscode-java-pack#1536.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes Project Manager for Java’s internal build commands/tasks to use JDT LS incremental build by default, while keeping explicit “rebuild” (clean + full) actions available for users who need them.

Changes:

  • Switches “Build All / Build Project” to call JDT LS incremental build (full flag = false) and adds/keeps “Rebuild …” variants (full flag = true).
  • Updates the default java (build) task and task schema so isFullBuild defaults to boolean false, including when the property is omitted.
  • Updates command titles and localized strings, plus a unit test assertion for the default task.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/suite/buildTask.test.ts Asserts default build task is incremental (isFullBuild: false).
src/views/dependencyDataProvider.ts Adds new build/rebuild workspace + build project commands and routes to incremental vs full builds.
src/tasks/build/buildTaskProvider.ts Changes default task to incremental and defaults resolved tasks to incremental when isFullBuild is absent.
src/commands.ts Introduces new command IDs for rebuild workspace and build project.
package.nls.zh-tw.json Updates zh-tw command labels and clarifies isFullBuild description.
package.nls.zh-cn.json Updates zh-cn command labels and clarifies isFullBuild description.
package.nls.json Updates English command labels and adds new command labels.
package.json Adds new commands/menus and changes task schema default for isFullBuild to false (boolean).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tasks/build/buildTaskProvider.ts
Comment thread src/views/dependencyDataProvider.ts
Comment thread src/views/dependencyDataProvider.ts Outdated
Comment thread src/views/dependencyDataProvider.ts
Comment thread src/views/dependencyDataProvider.ts
@wenytang-ms wenytang-ms merged commit 6dd06d6 into main Apr 28, 2026
6 of 7 checks passed
@wenytang-ms wenytang-ms deleted the feature/incremental-build-commands branch April 28, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rebuild commands mostly perform "full" instead of "incremental"

3 participants