IDEA clobbering modules with same directory name
Hi All,
I have the following project structure:
module bar in /bar/bar.iml
module foo.bar in /foo/bar/foo.bar.iml
Whenever I restart IDEA, it decides that the two modules are the same and /bar/bar.iml gets overwritten with the data from foo.bar.iml.
Anyone else have the same problem? Any solutions?
Thanks,
Jad.
Please sign in to leave a comment.
Hello.
Can't reproduce.
You can take a look at the project's .idea/modules.xml. Are both paths to the .iml files, including all directory and file names, correct?
Regards,
Alexander.
I should also say that I'm using gradle for the new module. Here's exactly what happens:
- Module /bar/bar.iml already exists (and it's an ant module).
- I create gradle project /foo/bar/foo.bar.iml.
- I restart IDEA
- Problem: IDEA seems to then create /foo/bar/bar.iml, and module.xml has the correct info for /bar/bar.iml and /foo/bar/foo.bar.iml BUT it also has the new module /foo/bar/bar.iml, and the info from /foo/bar/foo.bar.iml gets written into /bar/bar.iml
I've tried fixing it multiple times but everytime I restart, it breaks. I'll try it in a clean project and see if I can reproduce and post it.
I was able to reproduce part of the problem on creating a module, but not the whole problem. Here's what to do:
When I replace ~/tmp/test/bar/bar.iml with its previous version before adding foo.bar, IDEA restarts OK.
My original project has many modules, and the interaction might be causing the extra breakage in the modules.xml and the creation of the additional .iml as my previous message specified. LMK if there's anything else I can do. For now, I've given up and now just make sure that each directory I create has a unique name...
Jad, thank you for reporting this! I've created http://youtrack.jetbrains.com/issue/IDEA-118040.
Victoria