Skip to content

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

@rgrunber

Description

@rgrunber

Looking through the UI contributions, I see that builds tend to run "full".

{
"command": "java.project.build.workspace",
"when": "view == javaProjectExplorer && java:serverMode == Standard && !java:noJavaProjects && !java:importFailed",
"group": "navigation@30"
},

{
"command": "java.project.build.workspace",
"when": "view == javaProjectExplorer && viewItem =~ /java:project(?=.*?\\b\\+java\\b)(?=.*?\\b\\+uri\\b)/",
"group": "8_execution@5"
},

context.subscriptions.push(instrumentOperationAsVsCodeCommand(Commands.JAVA_PROJECT_BUILD_WORKSPACE, () =>
commands.executeCommand(Commands.JAVA_BUILD_WORKSPACE, true /*fullCompile*/)));

context.subscriptions.push(instrumentOperationAsVsCodeCommand(Commands.JAVA_PROJECT_REBUILD, async (node: INodeData) => {
if (!node.uri) {
sendError(new Error("Uri not available when building project"));
window.showErrorMessage("The URI of the project is not available, you can try to trigger the command 'Java: Rebuild Projects' from Command Palette.");
return;
}
commands.executeCommand(Commands.BUILD_PROJECT, Uri.parse(node.uri), true);
}));

From #854 (comment) & https://wiki.eclipse.org/FAQ_How_do_I_turn_off_autobuilding_of_Java_code%3F the consensus seems to be that if a user has a large enough project, and they observe very slow performance on builds, one thing to try is disabling autobuild and switching to manually performing the build. If doing this, wouldn't it be best to make every build-related UI element do it incrementally ? That way the least amount of work is done, and if a full build is needed, the incremental builder would just fall back to that.

@jdneo , what are your thoughts on a proposal to change most of these commands to "incremental" ? Are there certain UI elements that should absolutely remain "full" ?

Update:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions