vscode-go fails to load workspace folders within WSL drives #1485
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Prerequisites
Run a WSL2 distribution on Windows. I used Ubuntu for this, but I believe it would affect anything using WSL drives.
Steps to repro
First, clone this project into a WSL folder (to use as the golang test project)
Second, open the folder under
//wsl$
in Visual Studio codeExpected result
The extension loads as one would expect.
Actual result
An error,
Error loading workspace folders (expected 1, got 0) failed to load view for file:///wsl$/Ubuntu/home/jake/c/src/github.com/golang/vscode-go: invalid workspace configuration: The system cannot find the path specified. Source: Go (Extension)
The editor itself loads correctly, and I can edit the project normally, but none of the golang functionality (format on save, etc) seems to work.
Opening a file gives me a related error:
Notes
A workaround is to not use WSL drives at all, check out your code onto your favorite drive, and go to
/mnt/c/path/to/folder
. However, disk I/O within the WSL drives is much faster within WSL because it doesn't need to go through an extra translation layer to map from the Windows filesystem format to the Linux filesystem format. Small projects compile for me within 100ms on WSL drives and 15 seconds under/mnt/c/
. The large project I'm working on with cgo bindings would likely never finish compiling. So as far as development time, I'm much better served running all the golang magic myself within the network drive than doing the workaround.The text was updated successfully, but these errors were encountered: