I’m having issues with importing Deps projects as modules. I have a monorepo with many many deps projects, which often depend on one another with :local/root . The thing is that a lot of them are in folders with same names e.g.: /common , /analytics/common , /logging/common , /analytics/client , /auth/client etc…. the problem is that when I try to import a new module from existing sources e.g. /payment/client that also has a local dependency of /payment/common it will try to create 2 new modules common and client that already exist. And the module creation screen WILL NOT let me change the names to something else. It will just complain that the modules already exist.
This is a complete showstopper, because I cannot develop on the new modules other employees have added.
Ok, I'm sorry for the delay with this, but I've reproduced this and fixed it. There were a couple of bugs here, in general this is a very fragile bit of code and a fairly awful IntelliJ API. They've actually completely rewritten all this and have a new API I need to move to at some point, which should make all this much easier and more robust/faster. In the meantime, this is fixed for the next EAP: https://github.com/cursive-ide/cursive/issues/3012
Oh, I forgot to say, thanks for the excellent repro case, it made finding and fixing this much easier! I'll add an integration test case from this.
Thanks for fixing this
So Cursive should handle this case, by creating modules with unambiguous names. Are you able to send a representation of the directory structure containing the deps.edn files so I can try to reproduce? I guess I'd need to know the :local/root deps too.
I will try
I'm just working on another issue, and this is next on the list, hopefully tomorrow.
Were you able to replicate?
Repro:
• untar
• move analytics folder out of base folder somewhere
• in IntelliJ open the base folder, creating a project
• in the bottom you see build scripts found common, cloud/web, click Load
• you will have a couple of modules
• move analytics folder back into base folder
• Project Structure (cmd+;)
• Modules view, click + button
• Select import module
• select /analytics/client folder
• go through wizard Import module from external model, Deps
• select Automatically import transitive :local/root …
• After finishing the wizard nothing will change
• Open Clojure Deps tool window and click Refresh Clojure Deps projects icon
• You will get an error Module already Exists common