Closed linrongbin16 closed 9 months ago
Hi! This is LuaFileSystem's limitation.
On Windows, the C runtime used to compile LuaFileSystem must be the same runtime that Lua uses, or some LuaFileSystem functions will not work.
https://lunarmodules.github.io/luafilesystem/manual.html#building
FYI: I use the following workaround. https://github.com/notomo/action-setup-nvim-lua/blob/cc7bc230b4ed5c9cbb2df9570bb749f560b69001/src/luarocks.js#L57-L65
hi @notomo , really thanks to your reply, I had updated my CI yaml file: https://github.com/linrongbin16/commons.nvim/pull/148/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR63-R85.
It's now:
windows_unit_test:
name: Windows Unit Test
strategy:
matrix:
nvim_version: [stable, nightly, v0.6.0, v0.7.0]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
id: vim
with:
neovim: true
version: ${{ matrix.nvim_version }}
- uses: ilammy/msvc-dev-cmd@v1
- uses: notomo/action-setup-nvim-lua@v1
- run: |
luarocks install busted
luarocks install vusted
vusted --shuffle ./test
It does following steps:
cl
) VC++ compiler.luarocks
and luajit-2
).busted
and vusted
, then run the unit tests.But there's 2 more errors in action runs: https://github.com/linrongbin16/commons.nvim/actions/runs/7383346276/job/20084404068
The Error-1: failed to install luasystem
library.
The Error-2: failed to find vusted
executable.
I guess the error rootcause is failed to install luasystem
, would you please help me?
hmm. I reproduced this. But this is hard to resolve for now. I'll look into it when I have time. This may be action-setup-nvim-lua's problem.
hi @notomo , FYI:
cannot remember the exact resource, but I believe I had seem some thing say that, we should compile lua/luajit/luarocks with ilammy/msvc-dev-cmd (the MSVC VC++ compiler, e.g. the cl
binary). Because default mingw/GCC has some issue, that could be the root cause of failure of luasystem
.
There's also hererocks, a python pip package to help install lua/luajit/luarocks on Windows.
There's also a PR PR-14 in gh-actions-luarocks, which is relate to luarocks support in Windows.
cc: @linrongbin16
Released workaround! https://github.com/notomo/vusted/releases/tag/v2.3.4
It's working here: https://github.com/linrongbin16/commons.nvim/actions/runs/7394420875/job/20115783971!!!
first thanks to your work so I could do unit test with lua on Neovim.
Here's a CI pipeline I want to do vusted unit tests on Windows, to support Neovim plugin running on Windows: https://github.com/linrongbin16/commons.nvim/pull/148
Here's the action runs: https://github.com/linrongbin16/commons.nvim/actions/runs/7382472681/job/20082321700
in the CI pipeline, I installed lua-5.1 and luarocks via the hererocks, then install all the vusted dependencies, they all succeed, but vusted failed to run with error:
I'm not sure why that happened, would you please help on that?