Open Shaunmax opened 1 year ago
Same problem here.
I need some more context, to me it looks like an error when some macro or app is executed.
if its when the app is executed it could be some kind of dead code elimination or something else related to how its compiled and for what target.
if its a macro that fails then you may have added a library to your intellij project but forgot to add it to your project setup or build file (hxml/project.xml etc.)
The error is generated when I run java -jar converter.jar config.json
. Just the presence of import statements in the .as source file causes it to happen, e.g.: import away3d.cameras.Camera3D;
I would have to debug to figure out what it gets stuck on, been a long time since I tried this and not sure when I can find the time to do so. While this tool did help me do some conversion of code, I ended up mostly using search and replace with regex to do as3 to hx conversion. Away3d is ported to openFL so it might be better to try to try to use that instead of depending on the as3 version converted to haxe
If i where to guess what might be the problem, i would guessing this way of initializing uints https://github.com/away3d/away3d-core-fp11/blob/master/src/away3d/cameras/Camera3D.as#L99C4-L114
Does it really look for all the Actionscript libraries as it converts? I really just want to convert the local AS3 and then swap out the dependencies for their Haxe versions.
I ended up going back to the AS3toHX library which worked fine, albeit it uses Haxe 3 syntax.
I don't work on this anymore and haven't used it for a couple years, so I can't really give any detailed answer, but to me this looks like a missing swc in the config. The converter needs to know all types, including ones from libraries, so it tries to find them either in the converted codebase or in given SWCs.
Also I'm totally confused by the discussion in this issue. The OP shows the converter "unresolved type" exception and you guys are talking about macros and DCE and away3d camera and uints...
Thanks @nadako — I share some of your thoughts. Recognizing the value of volunteer time, it would be nice to have an option to ignore dependencies and simply convert the code it is given.
it would be nice to have an option to ignore dependencies and simply convert the code it is given.
Well that was not how we wanted to do the conversion when we were working on it. Our intention was to have correct Haxe code that compiles and runs without further manual changes so we can do this automatically and make a smooth transition of a live game between Flash and HTML5. And we wanted to have the code to be clean, Haxe-idiomatic, without boilerplate, unnecessary reflection, etc. Because we had a huge codebase that we wanted to just continue working on after the transition is done, also without pausing the game development.
Without knowing all types it would not be possible, so this is why the converter is so strict. But one could implement some fallbacks to generate something sensible from that. Still, I'd not go this way and just connect all the SWCs.
Hello,
I am getting the following error :
@nadako @Neu2o @m0rkeulv Can anyone please help me understand, what exactly could be the issue?