tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/5824-injections-failing-in-a-release-buildRobotlegs: Discussion 2014-08-09T08:20:13Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/340632892014-08-08T08:17:06Z2014-08-08T08:17:06ZInjections Failing in a 'release' build?<div><p>Hey Tyler,</p>
<p>I think the culprit is the metadata stripping that I've
mentioned in the last discussion. Other than that, the only Flex
specific thing that could affect the loading of modules in a
robotlegs based application is the aforementioned
ApplicationDomain. (StyleManager can also be a problem, but it
concerns the unloading of modules and gc) .</p>
<p>When you run the release build, you actually run the optimized
application. If you don't specify otherwise, the metadata gets
stripped out in the optimized version. As a consequence, the
Injector won't see any [Inject] metadata tags, so the injections
fail. The same holds true for any libraries using metadata tags, or
for Adobe's tags like Bindable etc, or for any custom metadata tags
that you added to your code [GrilledCheeseSandwich].</p>
<p>Flex is pretty annoying sometimes when it comes to compiling
modules.</p>
<p>You might want to do a research on compiler option needed for
optimization, especially when using link-report to set
load-externs.</p>
<p>Adobe says: " You must specify the keep-as3-metadata option and
pass it the required metadata. At a minimum, you should specify the
Bindable, Managed, ChangeEvent, NonCommittingChangeEvent, and
Transient metadata names. You can also specify custom metadata that
you want to remain in the optimized SWF file."</p>
<p>See Using standard and cross-domain RSLs for more details:</p>
<p><a href=
"http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf674ba-7ff6.html#WS2db454920e96a9e51e63e3d11c0bf69084-7ad9">
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c...</a></p>
<p><a href=
"http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf674ba-7fff.html#WS19f279b149e7481c311d007d12d9f3bc5d8-8000">
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c...</a></p>
<p><a href=
"http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf67110-7fff.html">
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c...</a></p>
<p><a href=
"http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d1f.html#WS2db454920e96a9e51e63e3d11c0bf64277-7ffa">
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c...</a></p>
<p>Also, see the links mentioned in this discussion:<br>
<a href=
"http://knowledge.robotlegs.org/discussions/problems/806-rsls-with-pure-as3-code#comment_26529994">
http://knowledge.robotlegs.org/discussions/problems/806-rsls-with-p...</a></p>
<p>Hope that helps.<br>
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/340632892014-08-08T13:04:14Z2014-08-08T13:04:16ZInjections Failing in a 'release' build?<div><p>Ondina,</p>
<p>Yep, that did it... thank you very much!</p></div>Tylertag:robotlegs.tenderapp.com,2009-10-18:Comment/340632892014-08-09T08:19:46Z2014-08-09T08:19:46ZInjections Failing in a 'release' build?<div><p>No problem! Glad it worked out.</p></div>Ondina D.F.