You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce this issue. The root cause is that it's not allowed to acess file (here, locking file) via \\wsl$\<Distro>, from Microsoft's doc, it's more likley a network sharing thing, or implemented via 9p server. I double the locking api from winapi is implemented or even available.
It's purely a platform specific issue, and related to how files within WSL can be accessed in Win app.
…s, r=alexcrichton
Ignore file lock errors if unsupported, on Windows
Not all file systems support file locking; WSL’s network file system doesn’t seem to, and I don’t think other network file systems will, either (though I haven’t checked them). ERROR_INVALID_FUNCTION is Windows’ equivalent to Unix’s ENOTSUP and Linux’s ENOSYS which are checked just above.
Fixes#7511.
…s, r=alexcrichton
Ignore file lock errors if unsupported, on Windows
Not all file systems support file locking; WSL’s network file system doesn’t seem to, and I don’t think other network file systems will, either (though I haven’t checked them). ERROR_INVALID_FUNCTION is Windows’ equivalent to Unix’s ENOTSUP and Linux’s ENOSYS which are checked just above.
Fixes#7511.
Problem
When trying to build a project over a WSL mount, cargo is unable to lock Cargo.lock and generates an error
Steps
\\wsl$\<Distro>\tmp\testing
, then runcargo build
PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\tmp\testing> cargo build --release
error: failed to lock file: \wsl$\Ubuntu\tmp\testing\Cargo.lock
Caused by:
Incorrect function. (os error 1)
PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\tmp\testing>
Possible Solution(s)
Notes
Output of
cargo version
:cargo 1.40.0-nightly (a429e8c 2019-10-04)
The text was updated successfully, but these errors were encountered: