Open quinnhoener opened 10 years ago
Running without "--debug" seems to build and run fine.
I've also run into the issue of having duplicate setters or getters. The only way I was able to fix it was to revert back to an official release, re-download the nightly build, and change back to the developer build in haxelib. Occasionally this still pops up for me. It seems to coincide with the new compilation server stuff.
That's odd... it almost seems like a Haxe bug. What version of Haxe are you running?
Could you post a simple project that reproduces it? It doesn't seem to break for me even when I use Reflect.getProperty.
I'm on Haxe 3.1.3
Alright, I've been trying to figure out what specifically causes this error but I'm not able to boil it down into a small use case. It seems to be happening intermittently. I was able to narrow it down to two lines of code. In this scenario:
var pb :Playback = _assets.get('lair').getSound("typetext").loop(1);
pb.paused = true;
causes the uncaught syntax error to be thrown. If I comment out the pb.paused = true
line, everything works fine. Very strange.
If I rework my code slightly to look like this, the compiler error also goes away:
var pack :AssetPack = _assets.get('lair');
var pb :Playback = pack.getSound("typetext").loop(1);
pb.paused = true;
The weird thing is that when I put just this code into a barebones use case with just this code and these classes, I cannot get the error to come up again.
Even stranger, when I go back to the original 'big' project and recompile with the first use case which caused the error... The error no longer comes up.
So, I think you're right that it has something to do with the Haxe compiler. I also think it has something to do with the compilation server and cache somehow. It also seems to have something to do with multiple function calls with the word 'get' in them (for instance in getters and setters).
I guess another thing I just noticed is that in my project where this came up, it also stalled on a playback just like in Quinn's project. I wish I would have looked at the javascript error to see if it was in the same place or not. :(
Just had this pop up in another project, it looks like it's not just happening in DummyPlayback. I saw this come up on BasicMouse:
,__class__: flambe_platform_BasicMouse,__properties__: {get_y:"get_y",get_x:"get_x",set_cursor:"set_cursor",get_y:"get_y",get_x:"get_x",get_supported:"get_supported"}
Thanks guys, filed at HaxeFoundation/haxe#3156 since it seems to be a compiler issue.
Does anyone have a small project which reproduces this behavior?
When using the nightlies to run either "flambe build html --debug" or "flambe run html --debug" throws the above error and the page doesn't load. Looking at the line it's telling me in Chrome's Console.log is this the properties line:
flambe_platform_DummyPlayback.prototype = { set_paused: function(paused) { return true; } ,get_complete: function() { return this._complete; } ,dispose: function() { } ,class: flambe_platform_DummyPlayback ,properties: {get_complete:"get_complete",set_paused:"set_paused",get_complete:"get_complete",set_paused:"set_paused"} };