IDEA always recompiles all Flex modules

Hi, I have a medium-size AIR project, including 20 modules. I'm using the internal builder (also tried fcsh). Whenever I touch a single file in a module, Idea recompiles all the modules (and it takes 3mn). I wrote custom flex config files to avoid generating them at each compilation (following a recommendation found on Stack Overflow). I've set the -incremental flag on each module.
The only trick I found is to uncheck the "Use internal builder" and only leave it checked for the modules I'm working on. Is there a better solution ?

Thanks in advance for your help,

8 comments
Comment actions Permalink

If you click Build | Rebuild Project - all modules are recompiled, it is by design.
In case of usual 'Make' button IDEA should recompile only those modules where at least 1 file was touched since previous compilation and all modules that depend on these modules (transitively).
Using custom config files instead of generated ones doesn't give any performance gain, so if was the only purpose of using custom configs - I'mn not sure it is justified. -incremental flag can potentially improve performance (though not much and not for all projects), but we found it rather buggy, so decided not to use it by default.
IDEA tracks changes of files/folders mentioned in config file, and marks module dirty if touched, so this probably can be the reason of extra compilations.

If you still think that IDEA recompiles some modules that it should not - let's continue further investigations. For example let's check if anything will be recompiled if you press Make button twice in a row.

0
Comment actions Permalink

Hello Alexander,

Thank you very much for your fast reply. I should have explained that in my previous message, but I don't use the Rebuild Project. I already use the Make Project command. It does recompile everything in each module with the "Use internal builder" checkbox on.
I also use the -incremental flag, it does not change much, that's right.

I love Idea since version 3, and I'd like to be able to efficiently use it on this Flex project. I'm sure my problem can be fixed. If I can provide you more information, please ask.

Best regards,

0
Comment actions Permalink

Ok, what is your current IDEA version?
Our next goal is to understand what causes recompilation. Let's start with simple experiment - press Make 2 times in a raw. IDEA should skip all compilations at the 2nd time.
The next experiment - type a space in one file of some module and press Make. IDEA should compile only this module and modules that depend on it.

0
Comment actions Permalink

Hi Alexander,

I'm using Idea 10.5.2. Here are the results (I checked "Use internal builer" for all the modules):

- First Make: please find attached the Messages log in the Archive.zip (FIRST_MAKE_OUTPUT). Everything has been compiled in approx.3mn.
- Second Make, without touching anything: nothing compiled, that's OK
- Third Make, after adding a space in an mxml file: please find the attached Messages log (THIRD_MAKE_OUTPUT_AFTER_ADDING_SPACE). Everything has been compiled in approx.3mn again

Thanks a lot for your suport.

Best regards,

Jean-Marie



Attachment(s):
Archive.zip
0
Comment actions Permalink

Thank you, the case is clear now!
You have one IDEA module with plenty of Flex facets. That means that you build all your SWFs from the same code base (source foldrs are configured at module level). Of course when at least one source file is touched - IDEA must recompile all SWFs produced by this module. Probably you'd better rearrange your project and use several modules each with own source folders. Common code can be configured to module producing library (SWC) and some other modules will depend on it.

0
Comment actions Permalink

Hi Alexander,
Thanks a lot ! I thought that the Flex facets could be separately compiled, even if they were in the same module.
We'll restructure the project as suggested.
Best regards,
Jean-Marie

0
Comment actions Permalink

Hi,

I have the same issue and I'm not sure how to reorganize my code base.  I have my individual flex (not IDEA modules) modules nested beneath the main source folder which of course is the same module. Lke this:

src.com.projectname.modules.catalog

Whiel attempting to create a new IDEA module it wants to create a new source folder at the module level. When attempting to configure the main class it doesn't acknowledge my Flex module as a valid main class.

Jeff

0
Comment actions Permalink

@Jeff
Indeed, if all Flex modules (in IntelliJ IDEA terms they are Runtime-loaded modules, or RLMs) are in the same IntelliJ IDEA module then all are marked as dirty when any file within the module sources is touched. We don't have precise mechanism to track which source files are required for each output swf. You can add -incremental flag at Compiler Options tab (Addiditonal compiler options field) - but that will be at your own risk.

0

Please sign in to leave a comment.