-
Notifications
You must be signed in to change notification settings - Fork 408
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
[regression] Maven diagnostics show up and disappear on save #829
Conversation
I see the same regression reported in #756 (comment). No diagnostics on workspace restart |
@fbricon I have updated the PR. |
@@ -61,8 +60,17 @@ public BuildWorkspaceStatus buildWorkspace(boolean forceReBuild, IProgressMonito | |||
connection.publishDiagnostics(new PublishDiagnosticsParams(ResourceUtils.toClientUri(uri), Collections.emptyList())); | |||
} | |||
} | |||
ResourcesPlugin.getWorkspace().build(forceReBuild ? IncrementalProjectBuilder.CLEAN_BUILD : IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor); |
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 forceReBuild == false then you trigger 2 incremental builds
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.
Fixed.
markers.addAll(Arrays.asList(project.findMarkers(null, true, IResource.DEPTH_ONE))); | ||
for (IMarker marker : markers) { | ||
if (!marker.exists() || CheckMissingNaturesListener.MARKER_TYPE.equals(marker.getType())) { | ||
continue; |
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.
what's the purpose of this loop?
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.
Fixes #812
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.
ok and? the loop is a no-op
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.
Fixed.
" public static void main(String[] args){\n"+ | ||
" int ss = 1;;\n"+ | ||
" }\n"+ | ||
"}"; | ||
//@formatter:on | ||
IFile file = project.getFile("src/main/java/foo/Bar.java"); |
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 think the purpose of this test was to check standalone java files would cause the build to fail in case of an error
@yaohaizh please check how this PR affects your use cases |
Signed-off-by: Snjezana Peco <[email protected]>
redhat-developer/vscode-java#669 is still not fixed. Diagnostic still shows up on the dependency and then disappears. |
@fbricon I can't reproduce the issue. See https://www.screencast.com/t/rOOigjEk |
So I removed all vscode extensions but vscode-java, and the behaviour is a tiny bit different now.
But if I save a 2nd time, the marker on the dependency disappears, reappears briefly, then disappears for good:
Adding version |
I still can't reproduce the issue. |
yes |
Your log contains the correct diagnostics.
|
test this please |
Fixes redhat-developer/vscode-java#669
Signed-off-by: Snjezana Peco [email protected]