-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Warning Message of cargo build
when using vscode-remote of wsl
#62031
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
Comments
Can confirm the issue
With WSL (pengwin / debian based) here |
I had the same issue and it looks like this is not a problem with Rust but with the vscode Remote extension. They employ a file watcher that listens to file events to be notified about changes to files in an opened folder. Somehow that locks the files and causes permission errors. You can work around the compiler warnings by either configuring the file watcher to use polling instead of events or by excluding the |
@ra-kete That works. Thank you a lot! |
This issue is happening for me even without any vs-code instance running.
|
This issue also happens to me, on debian10@WSL1. set vs-code remote.WSL.fileWatcher.polling to true does not help, exiting vs-code does not help, add wsl debian's rootfs folder to the excluding folder list of the Windows Defender does not help.
The last part of the warning path even does not exist, while the omcr-xxx folder exists:
|
great! |
delete the target folder, exclude future target folders from being watched with |
Still happening today without any VS code running |
I have the same issue as @95th. Also happens without an instance of VS code running. Did you ever find a fix? |
I think this happens when you send SIGKILL to the |
Upgrading to wsl2 and deleting the target folder solved the issue. |
I've reported one of the underlying issues against cargo here: rust-lang/cargo#8830. I think there might be multiple underlying issues, one of which is that cargo doesn't seem to be safe when run concurrently. I haven't yet looked/raised one for that. This underlying issue is that cargo is showing cached build output. If that output printed an error, but succeeded, cargo would repeatably show the error output from the previous build. Hence seeing things like permission errors which are no longer present, or attempting to delete files which no longer exist. |
I close the VS Code, delete the |
I tried again. |
@Dragonphy did you try adding |
@yanshenxian it works, thank you 👍 |
I also got the warning when running |
I'm learning Rust with Visual Studio Code and WSL, and I have installed the Rust(rls) plugin on vscode. But when I compile my project with
cargo build
command, warning message occured as follows:However, as you can see, the build process completed normally and meanwhile the
cargo run
command runs the program correctly. Another thing is that when i compile with the--release
param, the warning doesnt emerge.I'm wondering what the warning message means and what effect it would brings. I can't find the detail of this message on Google or on official doc, so I opened this issue.
The text was updated successfully, but these errors were encountered: