'lime build' crashes

Hello,
I use HaxeFlixel, and this is the issue with most HaxeFlixel projects, but not some of them (at least one very simple works), and not pure OpenFl project (at least one very simple works).
Note that this is a different issue from the infamous Tilesheet removal.

When I’m using some combinations of Haxe (including 3.4-rc2) and OpenFl/Lime (including latest stable tag built from git), most of them fail like this:

>lime build neko
Called from ? line 1
Called from CommandLineTools.hx line 1681
Called from CommandLineTools.hx line 24
Called from CommandLineTools.hx line 130
Called from CommandLineTools.hx line 1554
Called from lime/project/ProjectXMLParser.hx line 23
Called from lime/project/ProjectXMLParser.hx line 56
Called from lime/project/ProjectXMLParser.hx line 2136
Called from lime/project/ProjectXMLParser.hx line 1311
Called from lime/tools/helpers/HaxelibHelper.hx line 31
Called from D:\build\HaxeToolkit\haxe\std/haxe/format/JsonParser.hx line 76
Called from D:\build\HaxeToolkit\haxe\std/haxe/format/JsonParser.hx line 80
Called from D:\build\HaxeToolkit\haxe\std/haxe/format/JsonParser.hx line 251
Uncaught exception - Invalid char 44 at position 406

or like this (this is for old OpenFl 3.6.1 and Lime 2.9.1):

>lime build neko
Called from ? line 1
Called from CommandLineTools.hx line 1400
Called from CommandLineTools.hx line 25
Called from CommandLineTools.hx line 126
Called from CommandLineTools.hx line 619
Called from lime/project/PlatformTarget.hx line 70
Called from lime/tools/platforms/WindowsPlatform.hx line 272
Called from lime/project/HXProject.hx line 244
Called from lime/project/ConfigData.hx line 35
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 127
Called from lime/tools/helpers/ObjectHelper.hx line 76
Called from D:\build\HaxeToolkit\haxe\std/neko/_std/Array.hx line 118
Uncaught exception - Invalid operation (+)
Build halted with errors.

I’m completely at a loss, and don’t know how to debug the issue.
Also it’d be very useful to hear how lime.exe gets built, how it’s connected to ‘lime rebuild tools’, from where it gets copied to Haxe folder, and what it depends on. Because I may just do it the wrong way.

Thank you in advance!

This looks related:

lime rebuild tools goes to the “lime/tools” directory and runs “haxe build.hxml” :slight_smile:

So the first error was indeed caused by flixel’s haxelib.json (the fix is explained in the link).
The second is somehow related to ‘haxelib’ tags in Project.xml, if I add one more to the project that works, I’ll most probably get the crash. Example: flixel - no crash, flixel+flixel-addons - crash.

About lime tools, do I understand the following correctly?

  • ‘lime rebuild tools’ compiles the tools.hxml project in tools directory;
  • when I call ‘lime’ on Windows I get through wrappers like: lime.exe -> lime/run.n -> lime/tools/tools.n (so in the end I just do ‘neko tools.n’);
  • if ‘lime rebuild tools’ fails I still have the last successfully compiled version of tools.n;
  • if ‘lime rebuild tools’ silently quits, it succeeded.

My current workaround for second error (using lime 2.9.1) is calling ‘lime rebuild tools’ with Haxe 3.2.1.

Yep, yep and yep.

lime is a shim to run the Lime “run.n”, which forwards most commands to tools.n. It’s not quite the same as neko tools.n, though, due to the current working directory, etc.

Oh, yeah, the older release won’t be compatible with Haxe 3.4

1 Like