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

Configuring java project stuck in 69% #2301

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Oct 30, 2022

Fixes redhat-developer/vscode-java#2763

Steps to reproduce:

  • set
"java.import.generatesMetadataFilesAtProjectRoot": true,

in settings.json

$ git clone git@github.com:springframeworkguru/spring-rest-client-examples.git
$ cd spring-rest-client-examples
$ rm -rf ~/.config/Code/User/workspaceStorage/
$ rm -rf .project .classpath .settings/ .factorypath target/ .apt_generated*
$ code .
  • wait for Java LS to build the workspace
  • exit VS Code
$ rm -rf .project .classpath .settings/ .factorypath target/ .apt_generated*
$ code .

Test vsix: https://github.com/snjeza/vscode-test/raw/master/java-1.12.1.vsix

Signed-off-by: Snjezana Peco snjezana.peco@redhat.com

@jdneo
Copy link
Contributor

jdneo commented Oct 31, 2022

I can repro the issue according to the given steps. And the fix seems working.

Something I'm interested in:

What will happen if we do not wait for the auto build off job?
Is this related with c141741?

@rgrunber
Copy link
Contributor

rgrunber commented Oct 31, 2022

re-test this please.

Change also works for me.

@snjeza
Copy link
Contributor Author

snjeza commented Oct 31, 2022

Is this related with c141741?

No, it isn't.

What will happen if we do not wait for the auto build off job?

Java LS will freeze.

org.eclipse.jdt.apt.core.internal.generatedfile.GeneratedSourceFolderManager.removeFolder(GeneratedSourceFolderManager.java:508)

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=574227

@snjeza
Copy link
Contributor Author

snjeza commented Oct 31, 2022

test this please

@jdneo
Copy link
Contributor

jdneo commented Nov 1, 2022

@snjeza Thanks for the explanation. Maybe we can also add a comment to explain why we need to call ((Workspace) workspace).getBuildManager().waitForAutoBuildOff();?

@rgrunber
Copy link
Contributor

rgrunber commented Nov 1, 2022

Anytime we do such changes, it would be good to have a comment (ideally in the commit message body, or just referencing the bug in a comment) explaining why we do these changes. My only concern is that we never remove/undo one of the changes in order to fix another, which causes a regression.

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

snjeza commented Nov 1, 2022

Maybe we can also add a comment to explain why we need to call ((Workspace) workspace).getBuildManager().waitForAutoBuildOff();?

@jdneo @rgrunber I have updated the PR.

@snjeza snjeza merged commit 02d1e2d into eclipse-jdtls:master Nov 1, 2022
@snjeza snjeza deleted the issue-2763 branch November 1, 2022 21:34
@rgrunber rgrunber added this to the End November milestone Nov 30, 2022
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.

Configuring java project stuck in 69%
3 participants