You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/06/04 07:05:42 UTC
[GitHub] aharui commented on issue #240: Generated ${body} has an invalid
class reference on release
aharui commented on issue #240: Generated ${body} has an invalid class reference on release
URL: https://github.com/apache/royale-asjs/issues/240#issuecomment-394254777
I tried getting the source and building it myself. It compiled with 0 errors and a pile of warnings. Then I ran the bin/js-release version. The error I got was cryptic, but upon investigating it turned out that Scene.js could not find starling.display.Sprite when setting up its prototype chain. In examining starling.swc, there are no externs files in there so nothing would prevent renaming of starling.display.Sprite to, in my case, starling.display.C. I'm out of time for tonight so I guess tomorrow I will try to find time to work from your AS Externs and see if I get a different result.
When creating an externs SWC, there is a SWF output that creates the library.swf in the SWC so the Royale compiler knows what definitions are in there, and there is a JS output that generates the .js files that Google Closure Compiler expects. Those .js files need to be packaged in the SWC in a 'folder' called 'externs'.
Royale does not generated code that will load ES6 modules or CommonJS modules at this time, but someone can certainly volunteer to write an "Emitter" that does so.
FWIW, when I debug the minified code, I know that the exported name of each class should still be in the minified JS so searching for "scenes.Scene" led me to the minified code for that class.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services