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
Please sign in to leave a comment.
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?
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
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.
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
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):
Sorry for the typo, there should be
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
Thanks, I've got what I wanted.
Output SWC files are marked dirty for some reason. Let me think for a while.
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.
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
Have you had another look at our invalidation problems?
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.
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 =)
Glad to be of help!