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

Fix build on Windows #991

Closed
wants to merge 1 commit into from
Closed

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Apr 12, 2019

return new Object();
});
}

private void disconnectFromWorkspace() {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will called twice and log two duplicate logs?

@@ -304,27 +305,35 @@ private CodeActionOptions getCodeActionOptions() {
@Override
public CompletableFuture<Object> shutdown() {
logInfo(">> shutdown");
disconnectFromWorkspace();
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious why this is not put in the computeAsync body?

@snjeza
Copy link
Contributor Author

snjeza commented Apr 12, 2019

This will called twice and log two duplicate logs?

We have to save a workspace in both, the exit and shutdown method because ParentProcessWatcher calls only the exit method. If you kill VS Code, ParentProcessWatcher will stop Java LS server and call disconnectFromWorkspace only once.

Just curious why this is not put in the computeAsync body?

Saving a workspace is a priority task.

@fbricon
Copy link
Contributor

fbricon commented Apr 12, 2019

  Just curious why this is not put in the computeAsync body?

Saving a workspace is a priority task.

computeAsync still seems more "correct", after reading the comments on microsoft/vscode#35196 (comment)

@snjeza snjeza force-pushed the issue-793 branch 3 times, most recently from 125ff6a to f3bf055 Compare April 12, 2019 23:48
@snjeza
Copy link
Contributor Author

snjeza commented Apr 12, 2019

@snjeza snjeza changed the title Fix build on Windows [WIP] Fix build on Windows Apr 21, 2019
@snjeza snjeza changed the title [WIP] Fix build on Windows Fix build on Windows Apr 23, 2019
@snjeza
Copy link
Contributor Author

snjeza commented Apr 23, 2019

You can also test with the following property on Windows:

"java.jdt.ls.vmargs": "-DwatchParentProcess=10 -noverify -Xmx2G -XX:+UseG1GC -XX:+UseStringDeduplication",

'-DwatchParentProcess=10' is default on Mac/Linux.

@fbricon
Copy link
Contributor

fbricon commented May 2, 2019

Closing the spring-boot workspace leads to some project state being corrupted, failing to build on restart

Signed-off-by: Snjezana Peco <[email protected]>
@snjeza snjeza reopened this May 2, 2019
@snjeza
Copy link
Contributor Author

snjeza commented May 3, 2019

Closing the spring-boot workspace leads to some project state being corrupted, failing to build on restart

I can't reproduce the issue.
I suppose you closed the workspace while it was building. If so, you probably faced #1010

@snjeza
Copy link
Contributor Author

snjeza commented Mar 8, 2021

The issue has been fixed within #1661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants