some modules show packages, others don't

I just created a project and imported many existing IDEA modules into it. When I view the project in Packages mode, with Show Libraries Contents turned off, about half of the modules are shown to contain packages (there is a disclosure triangle), but the others do not. I am not aware of any interesting differences in the modules that would explain this difference in presentation. All of the modules should have packages. I tried invalidating the cache and restarting, but nothing changed. (In Project mode, all modules have sources, and the sources are grouped in packages, as expected.)

4 comments
Comment actions Permalink

I can add that when I rebuild the project, there are ten modules for which no class files are generated. I do not understand this.

These ten modules are all shown as not having packages in the Packages view. However, there are other modules for which class files are generated, yet these also are shown as not having packages in the Packages view.

0
Comment actions Permalink

Hello Alan,

Please attach an archive containing your .ipr and .iml files. This looks
like a project misconfiguration to me.

I just created a project and imported many existing IDEA modules into
it. When I view the project in Packages mode, with Show Libraries
Contents turned off, about half of the modules are shown to contain
packages (there is a disclosure triangle), but the others do not. I am
not aware of any interesting differences in the modules that would
explain this difference in presentation. All of the modules should
have packages. I tried invalidating the cache and restarting, but
nothing changed. (In Project mode, all modules have sources, and the
sources are grouped in packages, as expected.)

---
Original message URL:
http://www.jetbrains.net/devnet/message/5253470#5253470

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

I have found the answer to this problem. When I started using IDEA, I naively created separate projects and used global libraries to represent interdependencies. Apparently, IDEA gets very confused when a library and a module define the same classes. Not only does it fail to generate code for some modules, it also randomly fails to find imported symbols when they are imported with a wildcard in the package name.

Converting each and every one of my intermodule dependencies from a global library dependence to a module dependence fixed the problems.

0
Comment actions Permalink

Looks like the problem is still around in 11.1.1. I had the same issue and I REALLY appreciate you sharing your solution to this - no where else is this buggy behavior documented. I took the exact same .jar file I had as a Global library and made it a Project Library, and changed each and every Module dependency from the Global library to Module library and it fixed the problem. It was strange that this only occurred in 3 of my 11 Modules and I kept looking to try to find what was unique to them, even deleting and recreating them to no avail.

0

Please sign in to leave a comment.