How do I set lime version when running haxelib run openfl test neko project.xml?


I use git versions of lime and openfl. When I try to build my project I get:

Could not find haxelib “lime” version “7.1.1”, does it need to be installed?

I tried to run it with following args: -D disable-version-check -D lime-version=git but still get the same error.


Did you set it via Haxelib? In my experience, this overrides everything else.

> haxelib set lime git


Thank you, unfortunately it didn’t help.
I installed lime through haxelib git lime


Try these commands, for diagnostic purposes.

> haxelib list | find "lime"
> haxelib path lime
> lime --version


> haxelib list | find “lime”
lime-samples: [7.0.0]
lime: [git]

> haxelib path lime
-L C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\lime/git/ndll/
-D lime=7.1.1

> lime --version
Lime Command-Line Tools (7.1.1)
Use lime setup to configure platforms or lime help for more commands


Well, that all looks right.

I did some searching and tracked the error message to this line. It looks like that file is also running haxelib path lime but is unable to make sense of the output. It looks like it should be able to make sense of it, but somehow it can’t.

It would be nice to find the root cause, but I don’t feel up to it right now, so how about a workaround? Put this in your project.xml file:

<haxelib name="lime" version="7.1.1" path="C:/Users/kasim/Documents/HaxeToolkit/haxe/lib/lime/git/src/" />

This will store the path in a convenient lookup table, removing the need to call haxelib path lime.


If I put it before <haxelib name="openfl"/>, I get:

Warning: Could not find template file: neko/hxml
Error: Could not process argument export/neko/haxe/debug.hxml (file not found)
invalid character: /
Terminal closed with exit status 1

If after – the same as before (could not find lime 7.1.1).


I think you’re seeing the second error because it’s getting farther into the build process.

Looks like you’re compiling to Neko, and so it’s trying to copy the files in the templates/neko/hxml directory. But it can’t, for whatever reason. (That directory exists, right?)

This only causes a warning, so it continues. Later, it tries to access the copied files, and that’s when it crashes. I have no clue why it thinks “/” is an invalid character, but hopefully that will go away when you fix the previous things.

Since the warning message looks like the root cause, I tracked it down. After a fair amount of searching, I finally found some code that could have created the string "neko/hxml".

But I’m not sure I see anything wrong with the code, so I’m going to need some more information. Could you change the Log.warn() line to this?

Log.warn ("Could not find template file \"" + path + "\" in the following locations:\n"
    + Sys.getCwd () + templatePaths.join ("\n" + Sys.getCwd ()));


C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\lime\git\templates\neko\hxml exists and contains files.
I changed C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\hxp\git\src\hxp\System.hx 453 line as you suggested but output did not change. I installed hxp through haxelib git hxp https://… and after it didnt work, I ran haxelib dev hxp hxp so it set Development directory set to C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\hxp just in case, it didn’t work either.

I decided to change C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\openfl\git\include.xml line 6 <set name="lime-version" value="7.1.1" unless="setup || disable-version-check" /> value to “git” as a workaround.

Thank you for your weekend time you spent trying to help me!


Oh, right, sorry. You also have to run lime rebuild tools after changing anything related to the build process. I always forget that step…



Warning: Could not find template file “neko/hxml” in the following locations:
Error: Could not process argument export/neko/haxe/debug.hxml (file not found)
invalid character: /

C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\openfl\git\assets\templates does not contain neko template. I copied it from lime and got this:

export/neko/haxe/ApplicationMain.hx:40: characters 3-20 : Type not found : ManifestResources
export/neko/haxe/ApplicationMain.hx:133: characters 19-36 : Type not found : ManifestResources
export/neko/haxe/ApplicationMain.hx:139: characters 16-33 : Type not found : ManifestResources


I believe something might be broken in your install

Does haxelib path lime work? Does it return something sensible?

Are the GIT versions of OpenFL and Lime up-to-date?

I tested the current version of OpenFL using haxelib git on Lime, and it worked just fine


openfl 55945e24f56935bb5a1f4c2891e13a96eecc2dbd
lime 06982a4ac208360390bebe45e54c56345c10e245


I replaced 7.1.1 with git in C:\Users\kasim\Documents\HaxeToolkit\haxe\lib\openfl\git\include.xml and it started working again. I’m ok with this band-aid. Just thought I could set it in compiletime with -D lime-version=git.


Just a note. fixed the issue.


I realized in testing that I had a custom version of Haxelib, where this issue was patched:

So you could haxelib path lime:7.1.1 and if your current lib is set to GIT, and matches, it would return GIT instead of the exact lib version.

I’ll have to try again at seeing if we can get some of these patches merged to Haxelib