sublimelsp / LSP-lua

Convenience package with a lua language server bundled
MIT License
24 stars 5 forks source link

startup error: invalid cross-device link #19

Closed basaran closed 3 years ago

basaran commented 3 years ago

Hello,

While trying to enable, LSP-lua, this comes up:

image

If you could provide assistance, I will surely appreciate it. Thank you.

basaran commented 3 years ago

I figured it out, it was the shutil vs os.rename situation. I think the git repo is newer, so I will try that instead of the sublime package. If you could please update the package repository, it will make non python people's life more enjoyable :)

shutil.move(os.path.join(tmp, "extension", "server"), cls.basedir())

I also had changed the default version to 2.0.4 in sublime settings.

I can send a PR if you like.

rwols commented 3 years ago

Yes, please send a PR.

rwols commented 3 years ago

Actually, v1.0.1 is at the tip of the master branch. And packagecontrol.io reports 1.0.1 https://packagecontrol.io/packages/LSP-lua

rwols commented 3 years ago

Ah I understand your problem now. So the temporary directory is created on a different drive than the cache destination. And os.rename doesn't work with different drives, but shutil.move does https://docs.python.org/3/library/shutil.html#shutil.move

rwols commented 3 years ago

@basaran how about those pull requests?

rwols commented 3 years ago

I used shutil.move in b593376. Server will be upgraded in #21.

basaran commented 3 years ago

oh shoot :) I forgot, I'm so sorry, I have been working on this awesomewm config and completely zoned out from this. Let me review the changes in a sec.