rust-analyzer: failed to write request: Broken pipe (os error 32)rust-analyzermacro-error
/// Instructions supported by the generic Name Registry program
#[derive(Clone, BorshSerialize, BorshDeserialize, PartialEq)]
pub enum AggregatorInstruction {
/// Accounts:
/// 0. [writable] The aggregator to initialize
/// 1. [sign] Owner
/// 2. [] Rent sysvar
/// 3. [] Clock sysvar
Initialize(Config),
/// Accounts:
/// 0. [writable] The aggregator
/// 1. [sign] Oracle
/// 2. [] Clock sysvar
Submit { timestamp: Timestamp, value: Value },
}
it show some error
failed to write request: Broken pipe (os error 32)rust-analyzermacro-error
failed to write request: Broken pipe (os error 32)rust-analyzermacro-error
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 15
- Comments: 19 (5 by maintainers)
idk if tomorrow means fix will ship this Monday or next, but to whomst’d’ve it may’ve concerned, the temporary fix is:
to undo:
(obviously not hurrying anyone anywhere, btw)
I’ll sort it out tomorrow!
Having the same problem in VS Code with
rust-analyzer. Will prefer to stay on stable and not upgrade to nightly, so there is no fix for me yet.Hi. I’m still seeing this error in v0.2.853 when using the crate https://crates.io/crates/builder-pattern with just the example code.
I went through all your steps but had to add another one, even though VS Code showed the version you described in step 2:
Edit: I took the liberty to post this on Stack Exchange as there is there are too few Rust questions on Stack Exchange: https://stackoverflow.com/questions/70079983/rust-analyzer-failed-to-write-request-broken-pipe-os-error-32/70079984
@Sword-Smith we were downgrading the nightly, and that has since been resolved in #10769 and released yesterday. We can all return to the current nightly now. If you are currently having a problem with
stablerustc, which is1.56.1, it’s either a regression for the old ABI or an unrelated problem altogether.Please make sure:
rustup updateyour stablerust-analyzer version: 183ef048f 2021-11-22 stable(that’s the actual rust-analyzer binary that thematklad.rust-analyzerVS Code extension downloads separately). If not, close all your VS Code windows, it will try to update on next open.cargo cleanyour projectand then post the particular error you are getting.
I also encountered this error. My system was VSCode + WSL. I made a mistake of using WSL on Windows FileSystem, but then I came to know about the Remote-WSL extension. I switched VSCode to Ubuntu 20.04 filesystem(WSL) and then error was no more. Weird things happen if VSCode is used on Windows Filesystem.
I referred this link for getting the Extension idea. Follow this if you are using WSL + VSCode: https://harsimranmaan.medium.com/install-and-setup-rust-development-environment-on-wsl2-dccb4bf63700
Edit 2/12/2021: I think using / not using Windows Filesystem doesn’t make a difference and using Remote WSL Extension may fix nothing This is how I resolved it
rustup updateandrustup default nightlyCurrent rustc version rustc 1.59.0-nightly (48a5999fc 2021-12-01)Also I am using a macro which uses proc macro (borsh) under the hood
Just encountered the same problem as @Sword-Smith, I believed it happened just after I updated to the latest version of VSCode. I ran
rustup updateand then quit VSCode and restarted it and the error messages went way (not sure if therustup updatewas necessary or if fully restarting VSCode would have sufficed).TvT