Cyclic dependency keeps reappearing?
Since upgrading to the latest … some part of the IDE keeps modifying module-info.java to add a cyclic dependency.
My module info is for `open module com.marginallyclever.robotoverlord` and it adds `requires com.marginallyclever.robotoverlord` at the end. I have tried invalidaing caches and repairing the IDE. Neither has stopped the problem. Most troubling, not every compile. I haven't isolated which file to touch that will cause it.
-----
IntelliJ IDEA 2025.2 (Ultimate Edition)
Build #IU-252.23892.409, built on July 31, 2025
Source revision: 0a9a69b3f9332
Licensed to Makelangelo Software / Dan Royer
Subscription is active until February 17, 2026.
Runtime version: 21.0.7+6-b1038.58 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4090M
Cores: 16
Registry:
debugger.new.tool.window.layout=true
documentation.show.toolbar=true
ide.experimental.ui=true
jvm.dfa.analysis.ui.security.analysis.window.was.shown=true
Non-Bundled Plugins:
org.jetbrains.completion.full.line (252.23892.458)
com.intellij.notebooks.core (252.23892.464)
GLSL (1.24)
com.intellij.copyright (252.23892.464)
org.editorconfig.editorconfigjetbrains (252.23892.464)
org.jetbrains.plugins.yaml (252.23892.464)
PythonCore (252.23892.458)
org.toml.lang (252.23892.464)
com.intellij.properties (252.23892.464)
com.intellij.velocity (252.23892.464)
com.intellij.spring (252.23892.458)
com.intellij.swagger (252.23892.464)
com.jetbrains.restClient (252.23892.464)
intellij.jupyter (252.23892.530)
Docker (252.23892.515)
com.intellij.ml.llm (252.23892.530)
org.jetbrains.plugins.gitlab (252.23892.515-IU)
org.jetbrains.plugins.github (252.23892.515-IU)
com.github.copilot (1.5.55-243)
org.jetbrains.security.package-checker (252.23892.464)
com.intellij.microservices.ui (252.23892.464)
Kotlin: 252.23892.409-IJ
Please sign in to leave a comment.
Please try disabling the GitHub Copilot plugin and check if the problem still occurs.
If the problem persists, please create a new ticket in YouTrack (https://youtrack.jetbrains.com/newIssue?project=IDEA) and attach the IDE logs via Help | Collect Logs and Diagnostic Data and a sample project. This will help us investigate this issue in detail.
Thank you.
The only plugin I know that can edit files and that I'm using is IDEA's AI assistant. I haven't double checked yet if it's the culprit.
Please clarify, does this problem occur when you're using JetBrains AI (AI Assistant / Junie)? If so, it seems that this issue is similar to an existing ticket: IDEA-377947.
Definitely an issue. It persists when IDEA's AI assistant is disabled.
Hi Maxi. Would be great if you could provide a test project to demonstrate the issue, and actual steps to reproduce it. Thanks!
Hi sorry for the delay in the answer, it took a while to isolate the issue.
here are the steps to reproduce it:
- create a new gradle java project
- add 2 more files to the project:
1) an utility class Utils in a sub package of its own, this class must contain a public static method (lets say public static void print(){})
2) a module-info.java file exporting the 2 packages listed (in the picture ar.test and ar.test.utils)
- in the main method of the Main class paste the following snippet: Utils.print();
- the IDE will automatically add the import statements in Main class and update the modules-info.java file with a cyclic dependency
I see you also created https://youtrack.jetbrains.com/issue/IDEA-380666 for this. Let's continue the conversation there to avoid duplication.