My ant buildfiles tell mxmlc.jar to recompile target mxml source. However, if the target mxml source file has not changed, either ant or mxmlc is ignoring the file and will not create a new swf. This is an annoyance because I'm editing files imported by the target mxml. I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash). Is this what is happening? What's the standard work-around? At the moment, I'm editing the target mxml just to cause a file change.
2 Answers
Does Flex SDK’s mxmlc create a cache file or hash to determine if source code has changed?
All that is required to know if a file has changed or not is to look at the last modification time.
I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash).
A clean build should work fine if it's not too expensive.

- 108,024
- 16
- 131
- 187
-
So, are you saying that the mxmlc.jar compiler is storing the modification time of the target mxml source somewhere. If I know where that file is, or the cache/hash files that I assumed it was creating. I could instruct ant to wipe out those files before calling mxmlc.jar and thus manually cause a clean build. I'm guess that Flex Builder does something like that when it is told to do a clean build. Maybe I'm way off here. I can't think of any other way that the mxmlc.jar (in the flex sdk) would know how to ignore unchanged source. – Oct 23 '09 at 16:33
-
1It doesn't have to store that info. A simple stat on the file will tell you that. – dirkgently Oct 23 '09 at 17:09
Yes the flex SDKs create a cache file for the compiled byte code for each component.
Here is a link to the livedocs reference regarding the cache file
http://livedocs.adobe.com/flex/3/html/compilers_20.html#153980
As it notes: "One way to force a complete recompile is to delete the cache file from the directory."
So yes you can delete the cache to force a recompile of all files.
You could also just do a "clean" compile
You can also just set the compiler option -incremental=false

- 3,334
- 31
- 45