-
Notifications
You must be signed in to change notification settings - Fork 166
Conversation
Where do these paths come from? Are they the ones from the compiler? I.e., the filenames in spans? Or is it something more specific to the RLS? |
These paths comes from I suspect that first problematic path comes from initialize request - https://microsoft.github.io/language-server-protocol/specification#initialize |
So the file URIs in the ranges from the client? |
Inside the WSL environment there is the |
So using
Of course, we do not have to call
|
Yes, it should also work in reverse with the `-w` flag (from memory).
Better than hard coding a regexp or something as wslpath looks at the wsl
configuration to do the mapping correctly (in case you use a non standard
mount point).
…On Fri., 14 Dec. 2018, 3:10 am remin, ***@***.***> wrote:
So using wslpath like this?
C:\>wsl.exe wslpath 'c:/H_DEV/kudu'
/mnt/c/H_DEV/kudu
C:\>wsl
***@***.***:/mnt/c$ wsl.exe wslpath 'c:/H_DEV/kudu'
/mnt/c/H_DEV/kudu
Of course, we do not have to call wsl.exe in WSL.
***@***.***:/mnt/c$ wslpath 'c:/H_DEV/kudu'
/mnt/c/H_DEV/kudu
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#335 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHUlpu7oKC9xOR0VkAXC6j9yN3dN18lks5u4qYMgaJpZM4Uj4No>
.
|
So what needs to be done to get this across the line? I'd love to have this working, but this PR has been open since June... |
It seems like the communication is between VSCode and RLS(in WSL) directly. I can't see anywhere that the rls-vcode extension is able to map the paths before they are sent to RLS. That is the main part missing from this PR. If someone can point me in the right direction I can take a look. All the other language extensions that handle WSL (that I've looked into anyway) are using a custom protocol and aren't using the LanguageServerClient stuff. This PR currently just allows |
This is interesting. I didn't had enough time to look into different Originally I came up with an idea to run From my research half a year ago you cannot change paths that are being sent between My rust skills are too low to do this so I gave up on this |
Work on this feature moved to #488. |
Any update? |
@dtysky Pretty much done. Functionality is implemented yet it still require some tests. Do you mind to be a tester ? (Windows 10 required) |
My pleasure, so what should I do? |
@dtysky To run the extension from source (and this PR branch) please follow the steps in contributing.md. I don't develop on Windows, but I believe the use case here is that you want to install and use your Rust toolchain from inside the Windows Subsystem for Linux (WSL) inside a Visual Studio Code instance that's installed in and managed by Windows. To verify the fix, I believe it's enough to simply create a dummy project with @yisonPylkita is the above correct and/or did I miss anything? Also, I'm going to close this PR since the work on this moved to #488, please move the discussion there. |
@Xanewok You are right. These are the basic steps to check this feature. I wrote a little tutorial how to test this extension #488 (comment). Hope it will be helpful for anybody who wants to test this feature. |
To resolve all concerns with WSL (#160, #247, #144 ) and to fix my half-baked implementation GH-161 I have created this PR. It should fix all of the problems with running this extension via WSL.
This is still WIP. The only missing thing is mapping filesystem paths from vscode language client (windows) to rls (wsl)
Example:
I have simple rust application
kudu
. Lets run vscode on this application project.Initialization, rls detection, (installation if needed) and so on works without problems. Hard part begins when rls tries to look for
Cargo.toml
.I got error
It seems that to make this whole WSL thing working we need to make rls aware of wsl. Simplest way to fix it should be by introducing a filesystem paths mapping mechanism. So path
c:/H_DEV/kudu
should be mapped to/mnt/c/H_DEV/kudu
.@Xanewok any ideas how to implement paths mapping in rls ?