-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus Gradle Plugin 3.12.1+ breaks composite builds #41825
Comments
Upon further inspection, it is not only composite builds that fail. |
@dmlloyd ideas^^ |
Okay, I was able to trace the problem to this commit here: fe3d00d reverting this resolves the concurrent modification issue Edit: Interestingly this only seems to manifest within IntelliJ |
Looks like the problem is pretty straightforward, thanks to @BrianSetz's analysis. We appear to modify the dependency set while IntelliJ is iterating it from another thread. That said, I'm not sure what the fix would be. Maybe there's some more well-defined place where we can be doing our modifications? @aloubyansky any thoughts? |
The import issue is actually challenging. I realize we are registering these "conditional configurations" later than we are probably meant to but I am not sure what other option we have. The reason for fe3d00d was gradle/gradle#6881 |
Is there any path to solving this issue? We are also having issues with this. |
Yes, investigating and evaluating options currently. |
@LarsSven could you please confirm the issue is limited to an IDE import in your case as well? Thanks. |
On import and "Reload all gradle projects" action (on my side) |
Great to hear its being investigated! I can confirm the same behaviour as @ylemoigne mentioned, on both Windows and Linux IntelliJ IDEA environments. Running outside IntelliJ IDEA ( |
Yes it is limited to IDE import |
What is the recommendation for Quarkus Gradle + IntelliJ users? Should we remain on 3.12.0? Or is it safe to upgrade anyway? Should fe3d00d be reverted? Or is there another solution on the horizon? |
It should be safe to upgrade, AFAICT. There is a possibility we'll get some perspective on this from the Gradle team. |
@aloubyansky This is crippling for Kotlin projects in IntelliJ/IDEA. The failed import means Kotlin isn't ever configured and is basically unusable. Manually setting up Kotlin isn't workable either as it's blown out when the project is updated or even re-opened. |
An interesting point about the failure is that it seems to happen only when the |
@kdubb thanks for more info, just to be sure, is it also a consequence of the concurrent modification exception reported above? |
Yes, it's a similar ConcurrentModificationException. If I remove the
|
Sorry for all the issues this is causing. This is being looked into. I'll update this issue as soon as we arrive to a conclusion. |
The concurrent exception also appears when using the gradle plugin https://github.com/Splitties/refreshVersions. |
I've been using Quarkus 3.12.1 and later for about a month now, but didn't notice any issues until upgrading to IntelliJ 2024.2, which was released yesterday. Now there are annoying "Kotlin not configured" warning banners over every Kotlin file in my Quarkus project, which disappear when downgrading Quarkus to 3.12.0. Despite those warning banners, everything seems to work normally so far. I guess, just bumping the Quarkus version in By the way, IntelliJ releases were on June 21 (2024.1.4), August 6 (2024.1.5), and August 7 (2024.2). Quarkus 3.12.1 was announced on July 3. So, many users might just have become affected with a delay of a month and blame it on IntelliJ - maybe rightfully, I don't know. An issue for IntelliJ is here. |
The problem existed in both versions for me. I had the problem with |
Yes, I'm pretty sure I would have had the problem with 2024.1.x, too, if I had done a full Gradle import/sync for some reason, or created a new project. Just clicking on the "Load Gradle changes" action that pops up in the editor after editing Gradle-related files doesn't seem to be enough to trigger the issue for existing projects, as long as they have been fully imported before Quarkus 3.12.1 with the same IntelliJ version. |
Interesting... so if we drop to |
Good question... I tried, and figured... uhm... no. Then I downgraded to 2014.1.5 (which I had upgraded to, but haven't really used, shouldn't make a difference, though) - no issues at all. I could switch between Quarkus 3.12.0 and 3.13.1 with "Invalidate caches and restart" in between - no "Kotlin not configured banner". I apologize for jumping to premature conclusions. However, with IntelliJ 2024.2, before downgrading and after upgrading again: "Kotlin not configured" with Quarkus 3.12.1 and later, but not with 3.12.0. The release announcement for IntelliJ 2024.2 mentions as key highlight:
Maybe that's the crux of the matter. |
I'll revert the change that introduced this issue in the upcoming 3.14 release. The impact of the issue it introduced seems to be bigger than the one it fixed. |
Describe the bug
When building a composite Gradle project, a
java.util.ConcurrentModificationException
is thrown. I was able to trace the problem to this commit here: fe3d00d reverting this resolves the concurrent modification issue.Expected behavior
No ConcurrentModificationException, as was the case pre 3.12.1.
Actual behavior
How to Reproduce?
Reproducer: https://github.com/BrianSetz/quarkus-gradle-plugin-reproducer
Simply importing the project into IntelliJ causes the error to show.
Output of
uname -a
orver
Win11
Output of
java -version
java version "17.0.9" 2023-10-17 LTS
Quarkus version or git rev
3.12.1 / 3.12.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.8
Additional information
ConcurrentModificationException
also shows up in #41729 but does not seem to be connected to theTreeMap
.The text was updated successfully, but these errors were encountered: