.idea/MyModule.iml should not reference the project directory in the jdkName because it prevents sharing/checking in the iml file
tldr: Illuminated cloud puts the workspace root folder name in the jdk definition in MyModule.iml, meaning you can’t share/checkin MyModule.iml
Steps:
- Checkout project into /code/MyWorkspace1
- Load/create project in IntelliJ ( I tried with Webstorm and Idea )
- Checkin ./idea/* (except workspace.xml and any subdirectories)
- Checkout project into /code/MyWorkspace2 (On your machine or another. The important bit is the different path)
- load the project in IntelliJ
Expected: IntelliJ is happy, and IlluminatedCloud doesn’t need to change the jdkName in MyModule.iml
Actual: Illuminated Cloud prompts user to select a valid JDK, and then changes .idea/MyModule.iml with the new value - which now checks out the file every time you pull the code.
Notice MyWorkspace1
in the snippet below. Maybe this could be changed to $MODULE_DIR$ ?
<module type="IlluminatedCloud" version="4"> ... <component name="NewModuleRootManager"> ... <content url="file://$MODULE_DIR$"> ... </content> <orderEntry type="jdk" jdkName="IlluminatedCloud (MyWorkspace1/FullCopy)" jdkType="IlluminatedCloud" /> </component> </module>
Comments (3)
-
repo owner -
reporter Am I tripping over Webstorm’s (lack of) module management. For the moment, I don’t have module subdirs under my workspace. It looks like this:
/code/MyWorkspace1/
├───.idea
├───force-app
│ └───main/…..
├───IlluminatedCloud
│ ├───Sandbox
│ └───Prod
└───manifest/code/MyWorkspace2/
What does your directory structure look like? specifically around your ‘.idea’ and ‘df17-with-manifest’ directorys
-
repo owner Eric, while WebStorm doesn't explicitly expose the concept of modules, it does actually have a single module under-the-hood. The project shown above works fine in WebStorm, PhpStorm, etc., as well as in IntelliJ IDEA.
First, here's another relevant file,
.idea/modules.xml
which identifies the module file location:<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ProjectModuleManager"> <modules> <module fileurl="file://$PROJECT_DIR$/df17-with-manifest.iml" filepath="$PROJECT_DIR$/df17-with-manifest.iml" /> </modules> </component> </project>
The project directory structure is:
/path/to/projectRoot/
(generallyprojectRoot
is nameddf17-with-manifest
but can be named anything because everything else is relative).idea/
illuminatedCloud.xml
modules.xml
- ...
.sfdx/
.vscode/
config/
- configured as a source root, though for config files and not metadataforce-app/main/default/
- configured as a source root and designated as the default source rootmanifest/
- configured as a source root, though for config files and not metadata
There are many other projects as peers under
/path/to/
that are independent.Does that help?
- Log in to comment
Eric, assuming that the modules are stored under the project directory, and that the source roots are under the module's content roots, everything should be relative. For example, here's a pretty extensive configuration from my one of my own projects:
All paths there are set up for portability.
Can you explain in more detail exactly what kind of paths you're ending up with in your
.iml
file that aren't portable? I apologize but I'm not understanding from the existing information.