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

Intermittent Class Loading Issues with Java Core Packages #3296

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Oct 6, 2024

@snjeza
Copy link
Contributor Author

snjeza commented Oct 6, 2024

test this please

@snjeza
Copy link
Contributor Author

snjeza commented Oct 7, 2024

@rgrunber I have updated the PR.

@snjeza
Copy link
Contributor Author

snjeza commented Oct 7, 2024

test this please

@@ -174,6 +177,27 @@ public void start(BundleContext bundleContext) throws Exception {
if (System.getProperty(AssistOptions.PROPERTY_SubstringMatch) == null) {
System.setProperty(AssistOptions.PROPERTY_SubstringMatch, "false");
}
// https://github.com/redhat-developer/vscode-java/issues/3797
Job initializeAfterLoad = new Job("Initialize After Load") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this actually fix the issue ? I ask because when this job is scheduled, the client has probably not yet connected, nor has the server finished the initialized request. Looking though JavaCore.initializeAfterLoad(..), it seems like the kind of thing that should run after project import ? Does that make sense or is this location correct.

https://github.com/eclipse-jdt/eclipse.jdt.core/blob/55d99cde490111cad4874bc05eec03397ca5bc0e/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java#L4702-L4727

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it does. I have tried without it and Java LS always rebuilds indexes at cb2bbb7#diff-f23d0258ce24117c110acd6753e8490a09fbdf0bc039d662bdffe279c8c28469R742
We don't want to rebuild indexes every time.
You can try to comment it, and you will get rebuild indexes in the log.

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just some minor things.

@rgrunber rgrunber added this to the End October 2024 milestone Oct 16, 2024
@rgrunber rgrunber merged commit 57674f2 into eclipse-jdtls:master Oct 16, 2024
6 of 7 checks passed
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.

2 participants