openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
749 stars 359 forks source link

Fix error when locating Lime's bundled NDLLs. #1787

Closed player-03 closed 1 month ago

player-03 commented 1 month ago

We could fall back to haxelib path for very old versions of Haxelib, but most likely no one uses a version that old. Even if you're stuck on Haxe 3, you can still update Haxelib. Also, haxelib path gave incorrect results in the first place, so falling back wouldn't do any good.

I believe this will resolve #1786.

tobil4sk commented 1 month ago

haxelib path gave incorrect results in the first place

If you run haxelib path lime the output looks something like this:

-L /path/to/lime/git/ndll/
--macro lime._internal.macros.DefineMacro.run()
/path/to/lime/git/src/
-D lime=8.1.1

The -L flags have the ndll path, that's the correct thing to use if it's coming from haxelib path.

player-03 commented 1 month ago

We could do that too, as long as we rename the function to indicate that's what it's for.

tobil4sk commented 1 month ago

Looks like this happens here: https://github.com/openfl/lime/blob/d2ea41570bc195bd3c1ded9e67a2881b3cf31df2/tools/CommandLineTools.hx#L456-L462