-
Notifications
You must be signed in to change notification settings - Fork 446
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
Building a project never finishes #3639
Comments
I'm able to reproduce this as well, though I needed The thing that immediately stood out, and which I saw in my logs as well is :
Other than progress & diagnostic notifications, I didn't see anything else in the build process that might be responsible for triggering a rebuild. I think https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/d6bc183c77428d586b58fe8a5afcd8bd4bc98f20/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTUtils.java#L1266 ( eclipse-jdtls/eclipse.jdt.ls#1207 ) might be responsible since I can stop the cycle just by setting the parent to The pom is https://github.com/keycloak/keycloak/blob/main/distribution/licenses-common/pom.xml and the configuration is handled by build-helper-maven-plugin. @snjeza , any idea why this happens or how we could deal with it ? |
You can also try VS Code 1.32.0. See eclipse-jdtls/eclipse.jdt.ls#3150 |
I tried both:
but for some reason, these did not help for me. I still end up in build that never finishes. As @rgrunber pointed out license file generation, I now tested removing following lines from Keycloak https://github.com/keycloak/keycloak/blob/6a38be6239ad9dad7fb0c4941c117eddadc7958b/distribution/licenses-common/pom.xml#L30-L44. That allowed me to open and build the project again, so it is true that it is the culprit. |
I tried eclipse-jdtls/eclipse.jdt.ls#3150 as well and it didn't stop the build loop. I tried with a clear workspace cache for the keycloak project. The default is definitely It could just be that the issues fixed there have no effect here. Update: Ok, I saw one instance where the build loop stopped after maybe about 6 consecutive build operations. I think I'd have to run this some more times before/after the change to see if it actually improves it or if there's some chance the build loop doesn't occur. |
@rgrunber You are right. The keycloak project has other issues. However, eclipse-jdtls/eclipse.jdt.ls#3150 should help.
The build should also be faster because we postponed |
I will check. |
I tried this out with the latest pre-release and am still seeing the build loop for keycloak. @snjeza let me know if you see this as well. Is there anything we can do ? Here's what I noticed (note the timestamps) : [Trace - 15:24:49] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/rgrunber/sample-projects/keycloak/saml-core/src/test/java/org/keycloak/saml/common/util/StaxParserUtilTest.java",
"diagnostics": [
{
"range": {
"start": {
"line": 51,
"character": 67
},
"end": {
"line": 51,
"character": 73
}
},
"severity": 2,
"code": "67108967",
"source": "Java",
"message": "The method none() from the type ExpectedException is deprecated",
"tags": [
2
]
}
]
}
[Trace - 15:27:19] Received request 'window/workDoneProgress/create - (29)'.
Params: {
"token": "17a78d3e-ac88-4893-8b16-7768fc282144"
}
[Trace - 15:27:19] Sending response 'window/workDoneProgress/create - (29)'. Processing request took 0ms
No result returned.
[Trace - 15:27:19] Received notification '$/progress'.
Params: {
"token": "17a78d3e-ac88-4893-8b16-7768fc282144",
"value": {
"kind": "begin",
"title": "Building",
"message": "Building"
}
} The language server completed the build, sent the diagnostics, and was quiet for a few minutes. I didn't perform any actions, and could hear that my fans had spun down after the initial build. Then, the build job started for no reason I could see. |
@rgrunber I'm checking |
I Steps to reproduce:
@rgrunber could you try to add the following property to settings.json
|
|
The issue is an upstream m2e issue. You can try to import keycloak includes one similar project as described at #3639 (comment) |
|
Background:
I'm working on Keycloak using vscode-java. This project has proven to be quite challenging before, and unfortunately I now again have new problems that I'd kindly ask for help to troubleshoot.
The problem:
When opening the project the Java build never finishes. The constant re-compilation on the background will consume considerable CPU resources and heat up the machine.
The project builds correctly from command line using
mvn
.Environment
Steps To Reproduce
Current Result
The loop that gets executed again and again consists of following sequence of maven modules (grepping from logs):
it will then start from the
keycloak-parent
again, and continue forever, trying to build this set of modules. I'm not able to identify the reason why the build is (re)triggered again and again.Here are some log files from build:
Expected Result
Build should finish.
Additional Informations
I'm enabled following logs in
.vscode/settings.json
I've also tried excluding submodules by adding following in
.vscode/settings.json
but build still gets stuck in the same way, even though in theory the looping modules should not even be imported anymoreSome time ago I could open the project without infinite build loop. I did not use exclusions or any other workarounds in settings. At the moment, I do not yet know if my problem appeared after changes in Keycloak code or possibly after vscode-java update, or something else.
The text was updated successfully, but these errors were encountered: