From 6507165a76b016dec8f42c0974e1c94c084a40f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 04:23:18 +0000 Subject: [PATCH 1/8] Initial plan From c84f2f2339c18014514a93ea9c97ba3893499d29 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 04:24:52 +0000 Subject: [PATCH 2/8] fix macOS mise activation in E2E workflow --- .github/workflows/mise_e2e_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mise_e2e_test.yaml b/.github/workflows/mise_e2e_test.yaml index f8bdd19..d3dcb73 100644 --- a/.github/workflows/mise_e2e_test.yaml +++ b/.github/workflows/mise_e2e_test.yaml @@ -69,7 +69,7 @@ jobs: # Install via mise mise install vfox:version-fox/vfox-erlang@26.2.3 mise use -g vfox:version-fox/vfox-erlang@26.2.3 - eval "$(mise activate bash)" + eval "$(mise activate bash --shims)" which erl echo "===============PATH===============" echo $PATH @@ -77,7 +77,7 @@ jobs: mise install vfox:version-fox/vfox-elixir@1.16.2 mise use -g vfox:version-fox/vfox-elixir@1.16.2 - eval "$(mise activate bash)" + eval "$(mise activate bash --shims)" elixirc -v cd assets elixir hello.ex \ No newline at end of file From dcc31570c52e361efa99aef78e8e87ffcc467bc5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 06:10:31 +0000 Subject: [PATCH 3/8] fix mise workflow CI trigger paths --- .github/workflows/mise_e2e_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mise_e2e_test.yaml b/.github/workflows/mise_e2e_test.yaml index d3dcb73..4e996d3 100644 --- a/.github/workflows/mise_e2e_test.yaml +++ b/.github/workflows/mise_e2e_test.yaml @@ -3,9 +3,9 @@ name: mise E2E tests on: push: branches: [main] - paths: ['lib'] + paths: ['lib', '.github/workflows/mise_e2e_test.yaml'] pull_request: - paths: ['lib'] + paths: ['lib', '.github/workflows/mise_e2e_test.yaml'] workflow_dispatch: schedule: # Runs at 12am UTC From c7fc933e844b31906eb06d282adadc6c750b8083 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Jun 2026 07:03:19 +0000 Subject: [PATCH 4/8] fix: test local plugin in mise e2e workflow --- .github/workflows/mise_e2e_test.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mise_e2e_test.yaml b/.github/workflows/mise_e2e_test.yaml index 4e996d3..9144501 100644 --- a/.github/workflows/mise_e2e_test.yaml +++ b/.github/workflows/mise_e2e_test.yaml @@ -34,6 +34,12 @@ jobs: export PATH="$HOME/.local/bin:$PATH" mise --version + - name: Add local Elixir plugin for mise E2E + if: runner.os != 'Windows' + run: | + export PATH="$HOME/.local/bin:$PATH" + mise plugin add vfox-elixir-ci "$GITHUB_WORKSPACE" + - name: Install Erlang/OTP & Elixir via mise (Linux) if: runner.os == 'Linux' run: | @@ -51,8 +57,8 @@ jobs: echo $PATH echo "===============PATH===============" - mise install vfox:version-fox/vfox-elixir@1.16.2 - mise use -g vfox:version-fox/vfox-elixir@1.16.2 + mise install vfox-elixir-ci@1.16.2 + mise use -g vfox-elixir-ci@1.16.2 eval "$(mise activate bash --shims)" elixirc -v cd assets @@ -75,8 +81,8 @@ jobs: echo $PATH echo "===============PATH===============" - mise install vfox:version-fox/vfox-elixir@1.16.2 - mise use -g vfox:version-fox/vfox-elixir@1.16.2 + mise install vfox-elixir-ci@1.16.2 + mise use -g vfox-elixir-ci@1.16.2 eval "$(mise activate bash --shims)" elixirc -v cd assets From 130f0c7afe9524c40f570c1aaf7303e5d9a83425 Mon Sep 17 00:00:00 2001 From: yeshan333 Date: Tue, 16 Jun 2026 19:10:21 +0800 Subject: [PATCH 5/8] fix: use `mise plugins link` for local plugin in E2E workflow `mise plugin add` only supports Git/zip URLs, not local directories. `mise plugins link` creates the symlink mise needs to discover the local vfox plugin. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/mise_e2e_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mise_e2e_test.yaml b/.github/workflows/mise_e2e_test.yaml index 9144501..6725f14 100644 --- a/.github/workflows/mise_e2e_test.yaml +++ b/.github/workflows/mise_e2e_test.yaml @@ -38,7 +38,7 @@ jobs: if: runner.os != 'Windows' run: | export PATH="$HOME/.local/bin:$PATH" - mise plugin add vfox-elixir-ci "$GITHUB_WORKSPACE" + mise plugins link vfox-elixir-ci "$GITHUB_WORKSPACE" - name: Install Erlang/OTP & Elixir via mise (Linux) if: runner.os == 'Linux' From 3dc832130502bced87cd3f0baf7bb0f728a1c510 Mon Sep 17 00:00:00 2001 From: yeshan333 Date: Tue, 16 Jun 2026 19:22:07 +0800 Subject: [PATCH 6/8] fix: use mise env for actual tool paths and set fail-fast false mise strips shims from PATH when running vfox plugin hooks, so erlc is not found during Elixir compilation. Switch to `mise env` which exports actual tool bin directories. Also set fail-fast: false so both matrix jobs run independently. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/mise_e2e_test.yaml | 30 ++++++++++------------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/mise_e2e_test.yaml b/.github/workflows/mise_e2e_test.yaml index 6725f14..c8c1beb 100644 --- a/.github/workflows/mise_e2e_test.yaml +++ b/.github/workflows/mise_e2e_test.yaml @@ -14,6 +14,7 @@ on: jobs: mise_e2e_tests: strategy: + fail-fast: false matrix: # ref: https://github.com/actions/runner-images os: [ubuntu-22.04, macos-latest] @@ -47,43 +48,34 @@ jobs: sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk export MAKEFLAGS=-j4 export PATH="$HOME/.local/bin:$PATH" - - # Install via mise + mise install vfox:version-fox/vfox-erlang@26.2.3 mise use -g vfox:version-fox/vfox-erlang@26.2.3 - eval "$(mise activate bash --shims)" - which erl - echo "===============PATH===============" - echo $PATH - echo "===============PATH===============" - + eval "$(mise env)" + which erl && which erlc + mise install vfox-elixir-ci@1.16.2 mise use -g vfox-elixir-ci@1.16.2 - eval "$(mise activate bash --shims)" + eval "$(mise env)" elixirc -v cd assets elixir hello.ex - - name: Install Erlang/OTP & Elixir via mise (macOS) if: runner.os == 'macOS' run: | brew install autoconf libxslt fop wxwidgets openssl export MAKEFLAGS=-j4 export PATH="$HOME/.local/bin:$PATH" - - # Install via mise + mise install vfox:version-fox/vfox-erlang@26.2.3 mise use -g vfox:version-fox/vfox-erlang@26.2.3 - eval "$(mise activate bash --shims)" - which erl - echo "===============PATH===============" - echo $PATH - echo "===============PATH===============" - + eval "$(mise env)" + which erl && which erlc + mise install vfox-elixir-ci@1.16.2 mise use -g vfox-elixir-ci@1.16.2 - eval "$(mise activate bash --shims)" + eval "$(mise env)" elixirc -v cd assets elixir hello.ex \ No newline at end of file From 395b765c69b11d5e00bba081f04df95b95e16fc0 Mon Sep 17 00:00:00 2001 From: yeshan333 Date: Tue, 16 Jun 2026 19:33:07 +0800 Subject: [PATCH 7/8] fix: declare Erlang dependency in metadata.lua for mise >=2026.6.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mise v2026.6.10 sanitizes the environment for os.execute() in vfox plugin hooks — only declared dependencies get their bin dirs on PATH. Without this declaration, erlc is not found during Elixir compilation. Co-Authored-By: Claude Opus 4.6 --- metadata.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metadata.lua b/metadata.lua index 44282d4..8902121 100644 --- a/metadata.lua +++ b/metadata.lua @@ -14,6 +14,9 @@ PLUGIN.license = "Apache 2.0" PLUGIN.description = "Elixir vfox plugin, support for managing multiple Elixir language versions in Windows & Uinx-like system." +--- Erlang/OTP must be on PATH when compiling Elixir from source. +PLUGIN.depends = { "erlang" } + --- !!! OPTIONAL !!! --[[ NOTE: From 67bb26422733705b00c79e2bb861564004c79906 Mon Sep 17 00:00:00 2001 From: yeshan333 Date: Tue, 16 Jun 2026 20:02:49 +0800 Subject: [PATCH 8/8] fix: find Erlang bin dir for make in sanitized mise environment mise v2026.6.10 sanitizes os.execute() environment in vfox hooks, stripping mise-managed install dirs from PATH. This makes erlc unavailable during Elixir compilation. Add find_erlang_bin() that searches for erlc on PATH first, then falls back to scanning mise install directories. Inject the found directory into the make command's PATH. Co-Authored-By: Claude Opus 4.6 --- hooks/post_install.lua | 7 ++++++- lib/elixir_utils.lua | 24 +++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/hooks/post_install.lua b/hooks/post_install.lua index 5e65cdc..efa1570 100644 --- a/hooks/post_install.lua +++ b/hooks/post_install.lua @@ -14,7 +14,12 @@ function PLUGIN:PostInstall(ctx) elseif os.getenv("VFOX_ELIXIR_MIRROR") == "hex" then return else - install_cmd = "cd " .. path .. " && make" + local erlang_bin = elixirUtils.find_erlang_bin() + if erlang_bin then + install_cmd = "cd " .. path .. " && PATH=" .. erlang_bin .. ":$PATH make" + else + install_cmd = "cd " .. path .. " && make" + end local status = os.execute(install_cmd) if status ~= 0 then error("Elixir install failed, please check the stdout for details.") diff --git a/lib/elixir_utils.lua b/lib/elixir_utils.lua index 42ed479..0fe48ca 100644 --- a/lib/elixir_utils.lua +++ b/lib/elixir_utils.lua @@ -65,12 +65,30 @@ function elixir_utils.check_version_existence(url) end end +function elixir_utils.find_erlang_bin() + local handle = io.popen("which erlc 2>/dev/null") + local result = handle:read("*l") + handle:close() + if result and result ~= "" then + return result:match("(.+)/") + end + local home = os.getenv("HOME") or "" + local mise_dir = os.getenv("MISE_DATA_DIR") or (home .. "/.local/share/mise") + handle = io.popen("find '" .. mise_dir .. "/installs' -name erlc -type f 2>/dev/null | head -1") + result = handle:read("*l") + handle:close() + if result and result ~= "" then + return result:match("(.+)/") + end + return nil +end + function elixir_utils.check_erlang_existence() print("Check Erlang/OTP existence...") - local status = os.execute("which erlc") - if status ~= 0 then - error("Please install Erlang/OTP before you install Elixir.") + if elixir_utils.find_erlang_bin() then + return end + error("Please install Erlang/OTP before you install Elixir.") end function elixir_utils.get_elixir_release_verions_in_linux()