-
Notifications
You must be signed in to change notification settings - Fork 413
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
Apply autobuilding setting when initializing. #3177
Apply autobuilding setting when initializing. #3177
Conversation
Can one of the admins verify this patch? |
ProjectsManager.setAutoBuilding(preferenceManager.getPreferences().isAutobuildEnabled()); | ||
} catch (CoreException e) { | ||
JavaLanguageServerPlugin.logException("Failed apply autobuilding setting", e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We disable auto building on
Line 79 in 3a8937a
private static void prepareWorkspace() throws CoreException { |
Instead of adding this code, you can remove
LanguageServerApplication.prepareWorkspace()
.AFAICS, it doesn't affect performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I only remove LanguageServerApplication.prepareWorkspace()
, then it is impossible to disable autobuild through initialization params. I'll still remove it because autobuild should be enabled by default unless configured otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll still remove it because autobuild should be enabled by default unless configured otherwise.
Eclipse ResourcesPlugin remembers the workspace auto-build settings. See
- https://github.com/eclipse-platform/eclipse.platform/blob/8fe6bba1fe21e5cd255e5398596b5bc5e34f8342/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java#L214
- https://github.com/eclipse-platform/eclipse.platform/blob/8fe6bba1fe21e5cd255e5398596b5bc5e34f8342/resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java#L36
You are right. We have to call it if VS Code auto-build is off
Wait, @snjeza is this actually ok ? I remember we intentionally disabled autobuild during import to avoid import/build conflicts, #2252 . Update: It was introduced in #469 (comment) . Another discussion at #2519 . |
#2252 fixes it by interrupting the build. See Line 653 in 3a8937a
I think that we don't need to turn off auto-build anymore. I have tried importing/reloading the quarkus-langchain4j and keycloak projects and didn't notice any performance degradation. |
9725dff
to
9f2848d
Compare
Ok, if that's the case then I think we can consider doing this. CC'ing @testforstephen given that this would impact #2519 . |
Overall, the change looks fine. I just had one thought. @snjeza / @ethan-vanderheijden , would the syntax server now have the autobuild running as part of the steps leading up to the finishing of initialization (after that Before this change the autobuild was turned off in |
Java LS sets the autobuilding to off for the syntax server. See Line 181 in e95ec63
|
Fixes #3176