From 8905a7b5f8efd8a994ae6f85ab418eb89b82d31e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 04:10:52 +0000 Subject: [PATCH 1/2] Initial plan From 51f10cabbd18d9c672fb2356620bf54cdd9cbcf1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 04:16:25 +0000 Subject: [PATCH 2/2] fix: exclude pseudo versions from latest selection Agent-Logs-Url: https://github.com/yeshan333/vfox-lua/sessions/b85a8327-5213-4ed9-aa41-2f5eec9dd3bf Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com> --- .github/workflows/e2e_test.yaml | 11 ++++++++++- lib/utils.lua | 22 ++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e_test.yaml b/.github/workflows/e2e_test.yaml index 60121f2..26aa7c9 100644 --- a/.github/workflows/e2e_test.yaml +++ b/.github/workflows/e2e_test.yaml @@ -87,6 +87,15 @@ jobs: echo "Lua version $LUA_VERSION installed successfully" fi + - name: install latest lua by vfox-lua plugin (Linux) + if: runner.os == 'Linux' && matrix.lua_version == '5.5.0' + run: | + vfox install lua@latest + eval "$(vfox activate bash)" + vfox use -g lua@latest + eval "$(vfox activate bash)" + lua -v | grep '^Lua [0-9]' + - name: verify liblua.a is compiled with -fPIC (Linux) if: runner.os == 'Linux' env: @@ -259,4 +268,4 @@ jobs: echo "=== Verify LuaRocks ===" $HOME/.local/bin/mise exec -- luarocks --version $HOME/.local/bin/mise exec -- luarocks install luacheck - $HOME/.local/bin/mise exec -- luarocks list | grep luacheck \ No newline at end of file + $HOME/.local/bin/mise exec -- luarocks list | grep luacheck diff --git a/lib/utils.lua b/lib/utils.lua index d68022c..56f7e88 100644 --- a/lib/utils.lua +++ b/lib/utils.lua @@ -2,17 +2,27 @@ local http = require("http") local lua_utils = {} +local function parse_version_line(line) + return string.match(line, "([^,]+),([^,]+)") +end + +local function is_lua_release_version(version) + return string.match(version, "^%d") ~= nil +end + function lua_utils.get_lua_release_verions() local result = {} local resp, err = http.get({ url = "https://fastly.jsdelivr.net/gh/yeshan333/vfox-lua@main/assets/versions.txt" }) for line in string.gmatch(resp.body, '([^\n]+)') do - local version, checksum = string.match(line, "([^,]+),([^,]+)") - table.insert(result, { - version = version, - checksum = checksum - }) + local version, checksum = parse_version_line(line) + if version and checksum and is_lua_release_version(version) then + table.insert(result, { + version = version, + checksum = checksum + }) + end end return result @@ -23,7 +33,7 @@ function lua_utils.get_version_info(lua_version) url = "https://fastly.jsdelivr.net/gh/yeshan333/vfox-lua@main/assets/versions.txt" }) for line in string.gmatch(resp.body, '([^\n]+)') do - local version, checksum = string.match(line, "([^,]+),([^,]+)") + local version, checksum = parse_version_line(line) if lua_version == version then return version, checksum end