-
Notifications
You must be signed in to change notification settings - Fork 853
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
Netbeans 22 does not load a 8.9 gradle wrapper in project. Infinite loop. #7606
Comments
Can you test that with NetBeans 23-rc1. That has Gradle 8.9 Tooling in it. |
I am going to test it as soon i can. Anyway it seems to me that the option "prefer gradle wrapper" does not work. I expect that if i choose that option the wrpper inside the project should be used to compile it and not the netbeans' built in tool. |
@patton73 you misunderstand. The Tooling API is a Gradle library for executing Gradle builds. It will use the wrapper in the project, and is meant to be forwards compatible. Tooling API 8.7 in NB22 should be able to run a Gradle 8.9 build. I wonder if this is a sign of an upstream compatibility issue, or that NetBeans is doing something with the Tooling API that is breaking that forwards compatibility promise? As well as testing 23-rc1, it would probably be good to understand what is breaking in NB22 so that the issue does not recur. |
Netbeans 22 just does not load the project and it goes on loading forever. No log, no error, nothing to see. |
Sure, but a stack dump or similar (eg. |
I tested also the netbeans daily build. And it hangs as well with gradle wrapper. update: same problem with Gradle version 8.10. |
What else have you tried with? Have you compared to a basic project from Gradle init? Is it all projects affected? Did you import settings when trying NB23 rc? |
The project i linked is a completely IDE free gradle project (you can compile it by command line). Yes I imported old Netbeans 22 settings. I try also to avoid importing old settings to see if it loads without entering the infinite loop. |
Update: even if i do not import netbeans 22 setting the daily build hangs in an infinite loop. |
But does it apply to a Gradle project created using |
update: a completely empty project created with "gradle init" with version 8.10 (even without build.gradle since it does not create it) loads. But this does not resolve the problem. I have many projects that i upgraded to gradle 8.9 and 8.10 and they do not load in netbeans 22 and newer. And unfortunately the IDE does not print any error. It just tries to load the project in an infinite loop. |
So, do they have any configuration in common? Does removing some / all of the |
@patton73 could you try to trim down some of the failing projects to a minimal sample (no sources are needed actually, just the build files and dir structure) and attach it ? |
OK, the culprit is now known, reproduced on https://github.com/Rebirth-Project/version-comparator. The Here's the relevant part of stacktrace from the gradle daemon:
I've tried quick patches like giving the gradle's BuildAction an empty (byte[0]) |
Strarting from this project : https://github.com/Rebirth-Project/version-comparator update: cleaning the project and removing .gradle and netbeans cache does nothing. The behaviour is absolutely random. And this does not happen till gradle 8.8 wrapper. Only with gradle 8.9 and newer. |
You are saying that the "release" task is called automatically even if you do not call the task? Since that is the task that prompts for input. And this does not happen if you compile by command line. |
No. The task is not run. But NetBeans inspect all configured tasks and extensions for their properties. This task's field is (I guess) accidentally public (the author perhaps didn't care about default groovy visibility) making it formally a property - and mere reading of the property value results in an interactive prompt. |
@patton73 can you clarify what you mean by infinite loop? Does NetBeans keep doing something in a loop and it never completes, or does it mean that it gets stuck and the PC is idling from that point on. |
NetBeans keep doing something in a loop and it never completes. In particular it never loads the current project. it never finishes to load it. But it does not hang. You can continue working on other projects. |
@patton73 we are arguing about the wording So the question is whether you are sure about repeating (loop) - and the issue should be analyzed more to reproduce the "loop", or the report was simply inaccurate and we can assume the issue is fixed. With the PR applied I am able to open the test project without problems. |
Ok to be precise that is not a loop but a "pending" loading action that never finish. I called it a loop because in the status bar (bottom-right) the action never ends and the UI always shows the loading running action. So ok that is not a loop. |
#7606: process daemon's stdout to avoid lockup
@patton73 thanks for clarifying! all good. Thats what we saw too. |
I tested the new daily build. Now it works. I would close this bug. |
Apache NetBeans version
Apache NetBeans 22
What happened
If you have a project with a gradle wrapper 8.9. Netbeans 22 cannot load it. It just starts an infinite loop but does not load anithing.
Language / Project Type / NetBeans Component
No response
How to reproduce
Just make a project with a gradle 8.9 wrapper in it.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Linux Ubuntu 24.04 LTS
JDK
Jdk 17.0.11
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: