All modules compiled every time. Actionscript/Flex

I manage a project with about 10 modules. It seems like IntelliJ compiles all modules every time I start up the debugger. As far as the manual goes, this is not supposed to happen.
"IntelliJ IDEA keeps track of the modules where nothing has changed since the previous compilation"
https://www.jetbrains.com/idea/help/compiler-actionscript-&-flex-compiler.html

I tried seeting up two more or less identical sample modules, A and B. Module A references the build configuration of the 10 other modules. B references the built libraries (swc's) of the 10 other modules.
Approximate compile times are:
A: 15-25 seconds (always)
B: 1-2 seconds

I'll appreciate a little help to get my compile time back on track.
Version: IntelliJ 14.0, november 4 2014

14 comments
Comment actions Permalink

Yes, IDE should recompile only those modules where sources were touched and dependent modules. Files in what modules do you edit between compilations?
To analyze your problem I need to check your project structure. Can you please attach .idea folder and all *.iml files zipped?

0
Comment actions Permalink

No files are touched between compilations. I simply just clik Debug 'Build.All', stop/close the debugging window and click the button again.

The iml files are placed correctly relative to the project dir. Check the PROJECTDIR folder for .idea-folder.
The module BuildAll.Web contains the two variants of building.
BuildAll.Web references build configurations
BuildAll.Web.lib references the corresponding (pre-built) swc-files



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

Thanks, I'll investigate. One more thing I'd like to ask is build logs: Help | Show Log and in the folder that opens find build.log file in the build-log subfolder.

0
Comment actions Permalink

Log covers:

Start IntelliJ
Click Debug for BuildAll.Web
Click Debug for BuildAll.Web
Click Debug for BuildAll.Web.lib
Click Debug for BuildAll.Web.lib
Close IntelliJ



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

To make log more verbose please add the following to the build-log.xml file between <appender> and <root> (in the same folder where build.log is):

    <category name="com.intellij.jps.flex.build">
      <priority value="DEBUG"/>
    </category>
You do not have to close the IDE when editing this file.
Then reproduce the problem (debug the app 2 times so that it recompiles when it shouldn't) and attach updated build.log.
0
Comment actions Permalink

Sorry for the typo, there should be

    <category name="com.intellij.jps.flex.build">
      <priority value="DEBUG"/>
    </category>
0
Comment actions Permalink

I guess you meant


<root>
    <priority value="debug" />
    <appender-ref ref="file" />
</root>


I attached the build log using priority value debug. Compilation order is:
BuildAll.web
BuildAll.web
BuildAll.Web.lib
BuildAll.Web.lib

If the log is not what you expect, I would like you to modify my build-log config to match your request

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender name="console" >
    <param name="Target" value="System.err"/>
    <layout >
      <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
    </layout>
  </appender>

  <appender name="file" >
    <param name="MaxFileSize" value="20Mb"/>
    <param name="MaxBackupIndex" value="20"/>
    <param name="file" value="$LOG_FILE_PATH$"/>
    <layout >
      <param name="ConversionPattern" value="%d [%7r] %6p - %30.30c - %m \n"/>
    </layout>
  </appender>

  <root>
    <priority value="debug" />
    <appender-ref ref="file" />
  </root>

</log4j:configuration>



Attachment(s):
build.log.zip
0
Comment actions Permalink

Thanks, I've got what I wanted.
Output SWC files are marked dirty for some reason. Let me think for a while.

0
Comment actions Permalink

The reason  may be that some dependencies are configured as BC-on-project library but should be BC-on-BC (BC = Flash build configuration).
daluxlib.spark dependencies: dependency on daluxlib is configured twice: as BC-on BC and as BC-on-project library. Should be BC-on-BC only.
ViewLib: dependency on dalixlib and on DaluxShared libs should be changed to dependency on corresponding BCs.
DaluxField BC in BuildingExplorerWeb module: all dependencies on libs, not on BCs. Is it intentionally like in BuildAll.Web.lib? But no 'correctly configured' twin BC in this case (like BuildAll.Web).

When fixed I believe that the 2nd compilation will be almost instant.

0
Comment actions Permalink

One of our developers found out that he could circumvent the long compile time by changing the project dependencies to BC-to-lib. Those were a left over. For the sake of completeness/correctness I have changed all references to BC-to-BC. The compile times are the same.
On a side node, adding BC-to-BC and BC-to-lib for the same project should not make any difference - the library changes at the same time (more or less) as the build configuration.
BuildWeb.All 16748 ms
BuildWeb.All15844 ms
BuildWeb.All.lib 4615 ms
BuildWeb.All.lib 1413 ms

logs, .idea and .iml attached.



Attachment(s):
project+logs.zip
0
Comment actions Permalink

Have you had another look at our invalidation problems?

0
Comment actions Permalink

Sorry for delay. I think I found the cause!
Look at the DaluxShared module: source root is equal to the content root (DaluxShared) and output folder is inside it (DaluxShared/bin). That means that this module is always dirty. Each time when you compile it DaluxShared/bin/DaluxShared.swc file is created and since it is inside a sorce root - the module becomes dirty again!
So soultion is
- either create a DaluxShared/src folder, move sources there and configure source root accordingly (thus bin/DaluxShared.swc becomes outside of the source root)
- or mark DaluxShared/bin folder as Excluded: right click | Mark Directory As | Excluded.
I didn't test the latter way, so my choice would be to introduce src subfolder.

0
Comment actions Permalink

Perfect answer! Excluding bin did not help but having an explicit source folder did the trick though. Thanks a bunch. You are popular at my office =)

0
Comment actions Permalink

Glad to be of help!

0

Please sign in to leave a comment.