Alex, here are files you requested:
https://gist.github.com/mrchnk/c0965fdfef6caf0632acc78d1138940c
I used npm distribution of openfl version 8.7.0. You can download it into
the current directory using npm or yarn package manager:
npm install [email protected]
After that command, you can find openfl.swc, openfl.min.js as well as
non-minified version openfl.js at path node_modules/openfl/dist of the
current directory.
Also I used npm script "asconfigc --debug=true" to build the code
I tried to disable "remove-circulars" option (thanks to Harbs for pointing
me to that). It still compiles, and linkage problems seem to goes away. But
I figured out that circular dependencies cannot be resolved properly by the
closure library after all. Is there any common solution to that problem?
On Fri, Dec 14, 2018 at 8:56 PM Alex Harui <[email protected]> wrote:
> In addition to the data I asked for earlier, please also post link to
> openfl.swc and openfl.min.js.
>
>
>
> Thanks,
>
> -Alex
>
>
>
> *From: *mrchnk <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Friday, December 14, 2018 at 8:22 AM
> *To: *"[email protected]" <[email protected]>
> *Subject: *Re: Linkage problem for asjs compiler
>
>
>
> I don't know anything about the option "remove-circulars", so I think I
> use the default value here, which is enabled I guess.
>
> Actually, I am using asconfigc wrapper over the compiler, but I have
> nothing about that option in my asconfig.json neither.
>
>
>
> On Fri, Dec 14, 2018 at 2:39 PM Harbs <[email protected]> wrote:
>
> Are you using the remove-circulars compiler option?
>
>
>
> On Dec 14, 2018, at 10:24 AM, Alex Harui <[email protected]> wrote:
>
>
>
> OK.
>
>
>
> Please post a link to the entire output of the compiler including, if
> possible, the command-line you used. I won’t have time to look at it right
> away as I am at the end of my work day.
>
>
>
> Also post links to Client.as, Client.js, OasisClient.as, OasisClient.js,
> OasisHTML5Launcher.as, OasisHTML5Launcher.js
>
>
>
> And also verify how the compiler “should” find Client.js. Is Client.as in
> the source-path or is Client.js in a SWC?
>
>
>
> Thanks,
>
> -Alex
>
>
>
> *From: *mrchnk <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Thursday, December 13, 2018 at 10:24 PM
> *To: *"[email protected]" <[email protected]>
> *Subject: *Re: Linkage problem for asjs compiler
>
>
>
> Same problem with the nightly build. I also asked about my issue in openfl
> community.
>
> I think that problem may be related to circular dependencies in my code.
>
> Is there any way that can be handled automatically by royale compiler?
>
>
>
> On Thu, Dec 13, 2018 at 11:23 PM Alex Harui <[email protected]> wrote:
>
> Hi,
>
>
>
> Try a nightly build of Royale. I think some things have been fixed in the
> calculation of dependencies. I think if you are using npm, you can
> uninstall royale and then:
>
>
>
> npm install
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs/lastSuccessfulBuild/artifact/out/apache-royale-0.9.6-bin-js.tar.gz
> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapacheroyaleci.westus2.cloudapp.azure.com%3A8080%2Fjob%2Froyale-asjs%2FlastSuccessfulBuild%2Fartifact%2Fout%2Fapache-royale-0.9.6-bin-js.tar.gz&data=02%7C01%7Caharui%40adobe.com%7Cb31d441dc0f842e3527f08d661e05f3c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636804013629709087&sdata=MxuPdOmaowReUEwOkrdaLwTJMslI%2BgBaRWJ5qbcbV8o%3D&reserved=0>
>
>
>
> No guarantees that will fix your issue, but at least we can eliminate some
> possibilities.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *mrchnk <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Thursday, December 13, 2018 at 10:34 AM
> *To: *"[email protected]" <[email protected]>
> *Subject: *Linkage problem for asjs compiler
>
>
>
> Greetings!
>
>
>
> I tried to compile a large project using npm distribution of Apache Royale
> asjs compiler (@apache-royale/[email protected]). I changed all flash.*
> classes to openfl.*. After several hotfixes that project starts to compile.
>
>
>
> Here is index.html generated:
> https://gist.github.com/mrchnk/4f468d1abb1b02466a0dad43265c4333
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fmrchnk%2F4f468d1abb1b02466a0dad43265c4333&data=02%7C01%7Caharui%40adobe.com%7Cb31d441dc0f842e3527f08d661e05f3c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636804013629709087&sdata=PSEL%2FqvbM2e05%2Bme05buVTKnWwr852YRUqY3Tt0naWA%3D&reserved=0>
>
>
>
> The page is loaded with javascript errors:
>
> Uncaught Error: Undefined nameToPath for Client
>
> at visitNode (base.js:1356)
>
> at visitNode (base.js:1354)
>
> at Object.goog.writeScripts_ (base.js:1368)
>
> at Object.goog.require (base.js:705)
>
> at (index):1681
>
>
>
> (index):1687 Uncaught ReferenceError: OasisHTML5Launcher is not defined
>
> at (index):1687
>
>
>
> So Client.as is the superclass of OasisClient.as and is used in main
> OasisHTML5Launcher.
>
> It is successfully compiled to Client.js and declared as a dependency at
> index.html
>
> But a link to js file and declaration for that class is missing (I mean
> "goog.addDependency('../../../Client.as' ... )")
>
>
>
> So how to deal with that? Is it a Royale bug? Are there some guidelines I
> missed about my code?
>
>
>
> Thanks in advance.
>
>
>
> PS: I'm kinda new to mailing lists. So don't hesitate to correct me if I
> do something wrong.
>
>
>
>