Skip to content
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

Error while executing scripts/download_sumneko.lua #20

Open
luishgh opened this issue Feb 10, 2021 · 9 comments · May be fixed by #25
Open

Error while executing scripts/download_sumneko.lua #20

luishgh opened this issue Feb 10, 2021 · 9 comments · May be fixed by #25

Comments

@luishgh
Copy link

luishgh commented Feb 10, 2021

Got this error while executing :luafile scripts/download_sumneko.lua
I don't know if it is an issue or I have done something wrong, sorry if this is the case.

E5113: Error while calling lua chunk: ...hgh/.config/nvim/bundle/plenary.nvim/lua/plenary/job.lua:80: ./3rd/luamake/luamake: Executable not found
stack traceback:
        ...hgh/.config/nvim/bundle/plenary.nvim/lua/plenary/job.lua:80: in function 'new'
        scripts/download_sumneko.lua:16: in function 'run'
        scripts/download_sumneko.lua:55: in function 'build'
        scripts/download_sumneko.lua:62: in main chunk
@mnowotnik
Copy link

Same. Seems like there is a bug in plenary since args seem alright.

@mnowotnik
Copy link

mnowotnik commented Feb 21, 2021

Replace first argument in line "./3rd/luamake/luamake", "rebuild", with the full path to directory and it will work.
You may also adjust timeout value (10000 = 10 sec).

@luishgh
Copy link
Author

luishgh commented Feb 23, 2021

Replace first argument in line "./3rd/luamake/luamake", "rebuild", with the full path to directory and it will work.

Ok, will try it as soon as I have some free time.

You may also adjust timeout value (10000 = 10 sec).

How do I do this?

@dtomvan
Copy link

dtomvan commented Apr 15, 2021

Fixed by running the 3rd/luamake/compile/install.sh myself

@luishgh
Copy link
Author

luishgh commented Apr 16, 2021

Ok, will try it as soon as I have some free time.

Sorry for taking so long, free time has been really scarce for me recently :/.

I got this script to work, my changes were the following:

  • Changed timeout to 100000, but I guess a value lower would possibly work as well, however up until 20000 wasnt enough for me
  • I changed the first argument in line 56 to this, I think it should work with everybody as it doesn't use an absolute path:
    directory .. "3rd/luamake/luamake", "rebuild",

@luishgh
Copy link
Author

luishgh commented Apr 16, 2021

The only thing I'm not sure now is what cwd to put on this. Now that the luamake executable is called with its full path, I think the cwd could be omitted. However, I don't know how plenary works and if this is possible. I will do a commit with cwd set to directory because it worked this way and link the PR to this issue.

@mnowotnik
Copy link

mnowotnik commented Apr 16, 2021

I think it's a bug in libuv https://www.ibm.com/support/pages/apar/IV76797 . cwd param has no effect on resolving relative path of an executable - the current working directory of the invoking process is used for that purpose.

TL;DR

@luishgh just make a PR with your workaround and call it a day, you can omit cwd param

@luishgh
Copy link
Author

luishgh commented Apr 16, 2021

Just finished doing a few tests of the modified script and it seems to be working properly, will make the PR now.

you can omit cwd param

Actually the luamake rebuild fails if the cwd is not the lua-language-server folder:

/home/luishgh/.cache/nvim/nlua/sumneko_lua/lua-language-server/3rd/luamake/luamake: ...ua/lua-language-server/3rd/luamake/scripts/simu
lator.lua:105: /home/luishgh/make.lua: No such file or directory
stack traceback:
        [C]: in function 'assert'
        ...ua/lua-language-server/3rd/luamake/scripts/simulator.lua:105: in function 'simulator.dofile'
        ...lua-language-server/3rd/luamake/scripts/command/init.lua:4: in main chunk
        ...eko_lua/lua-language-server/3rd/luamake/scripts/util.lua:45: in function 'util.command'
        ...-language-server/3rd/luamake/scripts/command/rebuild.lua:9: in main chunk
        ...eko_lua/lua-language-server/3rd/luamake/scripts/util.lua:45: in function 'util.command'
        ...eko_lua/lua-language-server/3rd/luamake/scripts/main.lua:6: in main chunk
        [C]: in function 'require'
        ...lua/sumneko_lua/lua-language-server/3rd/luamake/main.lua:5: in main chunk
        [C]: in ?

So this section of the code actually stayed how it was.

@mnowotnik
Copy link

Nice work!

@luishgh luishgh linked a pull request Apr 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants