Fix haxelib path fallback functionality on windows#1241
Fix haxelib path fallback functionality on windows#1241tobil4sk wants to merge 1 commit intoHaxeFoundation:masterfrom
Conversation
The check on line 134 would never work properly on windows, because the line had a CR character so FileSystem.exists returned false. This meant that if a library was resolved via a name that doesn't exactly match the `-D` flag set by haxelib, e.g. Hxcpp instead of hxcpp or via an alias, then it would be reported as missing.
moxie-coder
left a comment
There was a problem hiding this comment.
I always wondered why this didn’t happen on Haxelib 4.1.1, and this forced me to downgrade back to 4.1.1
|
The reason is that haxelib used to have buggy behaviour when it came to case sensitivity in library resolution, which has now been fixed. For example, if you had While this old behaviour was clearly broken, it meant that the In haxelib 4.2.0, the behaviour was fixed across platforms (names are now case insensitive everywhere), and now it always uses the name in Using |
The check on line 134 would never work properly on windows, because the line had a CR character so FileSystem.exists returned false. This meant that if a library was resolved via a name that doesn't exactly match the
-Dflag set by haxelib (e.g. Hxcpp instead of hxcpp or via an alias), then it would be reported as missing.The fix can be verified by using haxelib 4.2.0 and running
haxelib run hxcpp Build.xmlusing thisBuild.xmlfile:Currently it fails with the error:
and with the fix, the path is printed without an error.
The same problem was also fixed in hxp, which uses very similar code: openfl/hxp#34.