Project package view showing useless empty packages from libraries?
Project package view is showing plenty of empty packages. Those which can be expanded are also empty and contain only more subpackages, but no actual files. I believe it lists packages from the libraries I am using.
Only the highlighted package belongs to my project. Than one also contain files as it should, and I image that it should be only one which is actually visible.
Also the Libraries are kinda messy, would be nice if files were groupped by the library, not everything combined together.
Project view works nicely, only packages view is this weird.
See the screenshot below?
Any advice? So far I am using the Project view, but I would find the Packages view much more comfortable, obviously if it worked correctly.
Cheers
About:
IntelliJ IDEA 2019.2 (Community Edition)
Build #IC-192.5728.98, built on July 23, 2019
Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 920M
Cores: 4
Registry:
Non-Bundled Plugins:
Please sign in to leave a comment.
Same issue reproduced in 2020.3.
the IDE packages view displays non-project packages (seems from maven dependencies).
Have tried "invalid cache and restart" and "restore default settings", even reimport the project, still no luck.
some projects suddenly run into this issue, then it cannot be recovered. but some other projects do not have the issue at all, that's odd.
All my code are in the package com.biron.linkum or in a subpackage, however, I have this in the package view :
I've tried to copy/paste my project in another folder (to do some cleaning before sharing it) but I don't have any issue with the copy project ...
Shhere Joe W Wachiuri Please follow the bug requests mentioned by Serge above to receive news on the matter.
Feature requests are welcome at https://youtrack.jetbrains.com/newIssue?project=IDEA.
I'd split it into 2 feature requests:
- Hide empty packages in the Package view
- Group packages by library for the Libraries node in the Packages view
Since 2 weeks I have the same issue, before that all work fine. In my case it's the "com" root level - not "org" - which contains useless package : perhaps because my code is under "com.myProject"
My project use maven and Kotlin (no java code). If I create a new Project all work fine.
Is there any config option that affect this ?
Thanks
About :
IntelliJ IDEA 2020.2 (Ultimate Edition)
Build #IU-202.6397.94, built on July 27, 2020
Licensed to XXX
Subscription is active until December 21, 2020
Runtime version: 11.0.7+10-b944.20 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-42-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1484M
Cores: 8
Registry: debugger.watches.in.variables=false
Non-Bundled Plugins: A prevent pinned tabs from closing plugin - by momomo.com, BashSupport, Scratch, String Manipulation, Builder Generator, Lombook Plugin, de.kontext_e.idea.plugins.autofill, org.mapstruct.intellij, com.jetbrains.ChooseRuntime, hunspell, org.antlr.intellij.plugin, MavenRunHelper, com.deadlock.scsyntax, intellij.prettierJS, org.jetbrains.plugins.node-remote-interpreter, org.jetbrains.kotlin, org.intellij.scala, com.jetbrains.php
Current Desktop: ubuntu:GNOME
What do you mean by the same issue? Please share a screenshot and a sample project to clarify.
Could it be some dependency jar providing the other packages?
Regarless to my pom.xml ( https://gofile.io/d/qgyONW ) I don't think so. I can found the package "com.amazon" in the pseudo folder "Libraries" but not in the copy project.
I've also tried "Invalidate caches / restart" but it the result to same thing after code analysis.
Does it help if you delete .idea directory and reimport from pom.xml?
I've closed intellij, rename my .idea to .idea.bak, reopen intellij and then reimport my pom.xml but it had no effect. The after "Invalidate caches / restart"
If you could come up with the test case project, please upload it at https://uploads.jetbrains.com.
I've reduce my project to a light one, you can get it at https://gofile.io/d/QJrY63 (it contains the .idea folder)
Upload id: 2020_08_10_2pR2v8QtxWkFqV9X (file: linkum.tar.gz)
Can't reproduce with the provided project.
Does it happen with the default settings? File | Manage IDE Settings | Restore Default Settings...: https://i.imgur.com/kbrkC7w.png
"Restore default settings" solve the pb.
After that I stopped Intellij, restore ~/.config/JetBrains/IntelliJIdea2020.2-backup to ~/.config/JetBrains/IntelliJIdea2020.2 et re-open intellij : there is no issue anymore.
Is there some black magic ? :)
Note that after this operation idea complains that there is a new version of kotlin plugin which I should install : 1.4.0 instead of 1.3.x (my project is configured with 1.4 but in Settings | Languages & Framework | Kotln it was 1.3.x). As far as I remember, I've never seen this message before.
Thanks for yours special power.
The issue reappears.
I've retried to "Restore default settings" and then go back to my previous settings with the same result as in my pevious message.
After some restrat of Idea or after some "build project" (the autobuild of Idea) the issue reappears again.
Sorry but I can't find the exact moment when this appends.
Related issues:
https://youtrack.jetbrains.com/issue/IDEA-248797
https://youtrack.jetbrains.com/issue/IDEA-145929
https://youtrack.jetbrains.com/issue/IDEA-165007
I am also facing this issue. It happens when I open more than one Intellij window.
Got Same Issue.
Idea Version: 2020.3
I see very much the same thing: in our multi project gradle build, like every sub project main test "folder" in the package view shows me plenty of completely empty packages that absolutely do not belong there.
This is super annoying.
NOTE: this depends on the settings for flatten module/package. I had both enabled. When I disable them ... our own packages all vanish, and only the empty library stuff shows up.
IntelliJ IDEA 2020.3.3 (Community Edition)
Build #IC-203.7717.56, built on March 15, 2021
Runtime version: 11.0.10+8-b1145.96 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 16
Non-Bundled Plugins: Key Promoter X, Statistic, com.urswolfer.intellij.plugin.gerrit, org.zalando.intellij.swagger, Docker, EclipseCodeFormatter, com.dubreuia, JRebelPlugin, org.jetbrains.kotlin, PlantUML integration, PythonCore, org.asciidoctor.intellij.asciidoc
https://youtrack.jetbrains.com/issue/IDEA-248797 was fixed in https://www.jetbrains.com/idea/nextversion/ . Please give it a try.
That was quick ;-)
So, in the "packages view", with "flatten modules" and "flatten packages" enabled, the view is what I expect:
packages with classes for our own sources.
With "flatten modules" disabled, ALL packages (3rd party libraries + our own sources) show up, under a Libraries folder.
SO: my big issue is resolved, albeit I find it strange that our own sources show up under "Libraries" in when "flatten modules" is off.
Unfortunately the issue is still there after upgrading to the IntelliJ IDEA 2020.3.3. Win 10.
One of my java project's package view always displays a lot of unwanted empty packages (maybe they are from my project's maven dependencies).
There are some extra clues for this bug:
- with the same project and the same IDEA release, the package view works normally under another WIN10 pc, as well as a Mac mini. But on a specific PC, it always show me the bug. I tried a lot of proposed solutions (config/restart/clear cache/recreate-codebase/reinstall/...), no luck yet. I have basically give up the package view panel..
- When i reopen the buggy project, the package view actually displayed normally for a few seconds, and then the status bar start to show something is loading(or indexing), after that, the package view was refreshed and totally polluted...
Hope for the real fix....
The fix is available in 2021.1 version, not in 2020.3.3.