Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only do full build for configuration change when auto build enabled #2437

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

CsCherrYY
Copy link
Contributor

@CsCherrYY CsCherrYY commented Feb 6, 2023

When auto build is disabled, we should not do a full build for the change of the configurations since it might take a lot of time. This PR fixes that.
When auto build is enabled, we should do that to keep the state of the workspace update.

Signed-off-by: Shi Chen chenshi@microsoft.com

Signed-off-by: Shi Chen <chenshi@microsoft.com>
if (jvmChanged || nullAnalysisOptionsUpdated) {
boolean isAutobuildEnabled = preferenceManager.getPreferences().isAutobuildEnabled();
boolean autoBuildChanged = ProjectsManager.setAutoBuilding(isAutobuildEnabled);
if (jvmChanged || nullAnalysisOptionsUpdated && isAutobuildEnabled) {
buildWorkspace(Either.forLeft(true));
} else if (autoBuildChanged) {
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be else if (autobuildchanged && isAutobuildEnabled) as well. We need to buildWorkspace only when autobuild is changed from false to true.

@CsCherrYY CsCherrYY changed the title Only do full build for null analysis configuration change when auto build enabled Only do full build for configuration change when auto build enabled Feb 7, 2023
Signed-off-by: Shi Chen <chenshi@microsoft.com>
Copy link
Contributor

@testforstephen testforstephen left a comment

Choose a reason for hiding this comment

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

LGTM

@CsCherrYY CsCherrYY merged commit 30e4958 into eclipse-jdtls:master Feb 7, 2023
@CsCherrYY CsCherrYY deleted the cs-autobuild-nullanalysis branch February 7, 2023 03:04
@rgrunber rgrunber added this to the Mid February 2023 milestone Feb 15, 2023
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.

None yet

3 participants