-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lua-language-server --check always return subprocess::spawn: (system:2)No such file or directory #2683
Comments
It seems to me, that this patch 38d8332 made it stop working. The offending line is this one lua-language-server/script/cli/check.lua Line 11 in e2ca72d
It looks like the executable name is in |
Currently fails to check due to upstream issue: LuaLS/lua-language-server#2683
Strange enough 😕 on windows and macos, Moreover I've been using LuaLS in my projects github action lint workflow, which uses the ubuntu-latest vm and it works normally as well. The gha step cmd that I used is simply: - name: Run LuaLS
run: |
${LUALS_PATH}/bin/lua-language-server --check=. --num_threads=2 --checklevel=Error Would the issue that you encountered is environment specific?
And as a side note, after PR #2638 added multi-thread support, now the |
Can you print out all the values of negative index of local exe = arg[-1]
local minIndex = -1
while arg[minIndex] do minIndex = minIndex - 1 end
for i = minIndex+1, #arg do
print(i, arg[i])
end
|
From the manpage of
And all the cmd line arguments before the script name will go to |
Hi, this is the output, if I add local minIndex = -1
while arg[minIndex] do minIndex = minIndex - 1 end
for i = minIndex+1, #arg do
print(i, arg[i])
end
I'm not so sure what |
Yes, I found this out here #2775 (comment) In this archlinux lua-lanugage-server package, #!/usr/bin/env sh
TMPPATH="/tmp/lua-language-server-$(id -u)"
mkdir -p "$TMPPATH"
INSTANCEPATH=$(mktemp -d "$TMPPATH/instance.XXXX")
DEFAULT_LOGPATH="$INSTANCEPATH/log"
DEFAULT_METAPATH="$INSTANCEPATH/meta"
exec /usr/lib/lua-language-server/bin/lua-language-server -E /usr/lib/lua-language-server/main.lua \
--logpath="$DEFAULT_LOGPATH" --metapath="$DEFAULT_METAPATH" \
"$@" https://gitlab.archlinux.org/archlinux/packaging/packages/lua-language-server/-/blob/main/wrapper I would say that this wrapper is overly complicated. 😕 It should be simply But I agree that we cannot just assume
It is the real binary path of LuaLS. And if you execute |
There is definitely a need for some sort of a wrapper, otherwise I do get a few errors:
AFAIK, this is due to logpath and metapath defaults not being writable by a normal user. Anyway, it seems to me, that just removing
I think the reason the wrapper specifies the entrypoint is to be 100% sure it is the one that the PKGBUILD script installs (and I suppose just for readability's sake). Also, it could be that '... omitted, the application will attempt to load bin/../main.lua' is not clear enough (but that might just be me). |
OIC, I just tested that in docker environment yesterday, so maybe I did not encounter these kinds of permission errors.
You got your point. I never noticed that luals cli supports an entry argument. 🙈 I just always invoke it by the binary file directly on windows / macos / ubuntu (github action) platforms. And from the bootstrap logic, luals will try the find if there is an entry argument (the script file) and treat it as the main script index => put it at |
As far as I can tell, there's no reason to run |
How are you using the lua-language-server?
Command Line
Which OS are you using?
Linux
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
NO error.
Actual Behaviour
Reproduction steps
lua-language-server --check
Additional Notes
No response
Log File
No response
The text was updated successfully, but these errors were encountered: