-
Notifications
You must be signed in to change notification settings - Fork 834
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
Support LockFileEx syscall in \\wsl$ directory #5762
Comments
Read this: https://devblogs.microsoft.com/commandline/a-deep-dive-into-how-wsl-allows-windows-to-access-linux-files/ and this https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-windows-10-version-1903/. Basically this means WSL2 will be unable to support without support being added to the 9P file server (unlikely). |
There's a comment in the golang/go repo that suggests that the 9P protocol does support file-locking, but the implementation used in WSL does not. Can someone on the WSL team confirm this is the case? If so, can we have any insight into whether or not this will be fixed at some point? |
@benhillis @craigloewen-msft I haven't seen any other MS employees active in these issues, so I'm pinging you two. If there's someone else that should be involved in this discussion, please let us know. |
This also affects Gradle (a JVM build system). |
This apparently also affects any programs on Windows which try to use SQLite to open a database on the WSL side (for instance, an ext4 partition mounted using
|
\wsl$ also doesn't support |
Is your feature request related to a problem? Please describe.
Package management tools such as Go Modules and Rust Cargo use Write/Read Lock of File System. This is an important mechanism for removing conflicts.
The WSL2 shared directory
\\wsl$
does not seem to support LockFileEx syscall. I confirmed that smb supports it. It returns anIncorrect function.
error with theLOCKFILE_EXCLUSIVE_LOCK
flag both set/unset.To solve this problem, Rust Cargo has added code that ignores lock errors. rust-lang/cargo#7602
Go Modules does not work with WSL and officially replied to Issue that WSL is not supported. golang/go#37461
Describe the solution you'd like
Add locking functionality to the shared file system for a better development experience.
Describe alternatives you've considered
Additional context
Below is an example of an error with go modules in latest version.
simple test code to call LockFileEx
The text was updated successfully, but these errors were encountered: