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

Unable to acquire the state change lock for the module 'buildship' #2758

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@0dinD
Copy link
Contributor

0dinD commented Jul 14, 2023

I tried to reproduce the issue I described in redhat-developer/vscode-java#3032 (comment), with and without this patch. Without the patch, the issue is very easy to reproduce, but with the patch, I did not manage to reproduce the issue even after restarting VSCode 10+ times. So it seems like it works 👍

@@ -93,6 +93,15 @@ public InitHandler(ProjectsManager manager, PreferenceManager preferenceManager,

@Override
public Map<?, ?> handleInitializationOptions(InitializeParams param) {
// https://github.com/redhat-developer/vscode-java/issues/3184
// start the m2e and buildship plugin before calling JavaCore.setOptions
Copy link
Contributor

Choose a reason for hiding this comment

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

Which JavaCore.setOptions(..) are you refering to ? There is call to that as soon as plugin activation happens for jdt.ls.core. See https://github.com/eclipse/eclipse.jdt.ls/blob/a1e091430705860a95456a7332a223d594025716/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/PreferenceManager.java#L160 . This change doesn't happen before that..

Copy link
Contributor Author

@snjeza snjeza Jul 14, 2023

Choose a reason for hiding this comment

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

See https://github.com/eclipse/eclipse.jdt.ls/blob/24c3892b7761a81a00bf0361153f3b0bf40219fb/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/PreferenceManager.java#L222

It is called from
InitHandler.handleInitializationOptions(InitializeParams) > BaseInitHandler.handleInitializationOptions(InitializeParams) > PreferenceManager.update(Preferences)

Copy link
Contributor Author

@snjeza snjeza Jul 14, 2023

Choose a reason for hiding this comment

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

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.

3 participants