Enable -D lua-vanilla for Lua tests, removing luarocks dependencies#175
Conversation
Co-authored-by: Simn <634365+Simn@users.noreply.github.com>
-D lua-vanilla for Lua tests, removing luarocks dependencies
|
@copilot Haxe has had some changes for better lua-vanilla support, see HaxeFoundation/haxe#12599. Please confirm that you're on commit c4c8605af68e2b3fe5f8e35d880fbf6786d15557 and then see if the bit-op-related workarounds here can be removed now! |
Co-authored-by: Simn <634365+Simn@users.noreply.github.com> Agent-Logs-Url: https://github.com/HaxeFoundation/hxcoro/sessions/7cfd3ffc-6906-432f-b0c7-3641ef3886a0
Confirmed on The Commit: edef8cf |
The Lua CI target required
luv,lrexlib-pcre2,luautf8, andbit32via luarocks. With-D lua-vanillaand Lua 5.4 as minimum, none of these are needed — but several runtime blockers existed.Blockers fixed
Sys.getEnv()inMain.hx— Guard theHXCORO_DISPATCHERdispatcher-selection block with#if (sys && !lua_vanilla)sinceSys.getEnvthrows in vanilla mode.Sys.sleep()inBackOff.hx— Used in the event-loop busy-wait; not available in vanilla mode. Added a#elseif lua_vanillano-op branch before the existing#elseif sysone.Sys.time()viaTimer.milliseconds()—HeapScheduler.now()→Timer.milliseconds()→Timer.stamp()→Sys.time(), which throws in vanilla mode. Added a#if lua_vanillabranch inHeapScheduler.now()usinglua.Os.clock()instead.Build file changes
tests/build-lua.hxmlandcallstack-tests/build-lua.hxmlnow include:CI changes
The
Setup Luastep inmain.ymlis reduced to just installinglua5.4— all luarocks packages (luv,lrexlib-pcre2,luautf8,bit32) are removed.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.