{"record":{"id":"26df46d9adeaa21b","repo":"rust-lang/rust-analyzer","slug":"proc-macro-server-did-not-respond-with-data","errorCode":null,"errorMessage":"proc-macro server did not respond with data","messagePattern":"proc-macro server did not respond with data","errorType":"error_code","errorClass":"ServerError","httpStatus":null,"severity":"error","filePath":"crates/proc-macro-api/src/process.rs","lineNumber":332,"sourceCode":"        result\n    }\n\n    pub(crate) fn send_task_legacy<Request, Response>(\n        &self,\n        send: impl FnOnce(\n            &mut dyn Write,\n            &mut dyn BufRead,\n            Request,\n            &mut String,\n        ) -> Result<Option<Response>, ServerError>,\n        req: Request,\n    ) -> Result<Response, ServerError> {\n        self.with_locked_io(String::new(), |writer, reader, buf| {\n            send(writer, reader, req, buf).and_then(|res| {\n                res.ok_or_else(|| {\n                    let message = \"proc-macro server did not respond with data\".to_owned();\n                    ServerError {\n                        io: Some(Arc::new(io::Error::new(\n                            io::ErrorKind::BrokenPipe,\n                            message.clone(),\n                        ))),\n                        message,\n                    }\n                })\n            })\n        })\n    }\n\n    fn with_locked_io<R, B>(\n        &self,\n        mut buf: B,\n        f: impl FnOnce(&mut dyn Write, &mut dyn BufRead, &mut B) -> Result<R, ServerError>,\n    ) -> Result<R, ServerError> {\n        let state = &mut *self.state.lock().unwrap();\n        f(&mut state.stdin, &mut state.stdout, &mut buf).map_err(|e| {\n            if e.io.as_ref().map(|it| it.kind()) == Some(io::ErrorKind::BrokenPipe) {","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/rust-lang/rust-analyzer/blob/e8f7e90aa3e7b26aa9a000200f606c1078da99ec/crates/proc-macro-api/src/process.rs#L314-L350","documentation":"A `ServerError` constructed in `send_task_legacy` when the legacy JSON protocol request succeeded at the transport level but the send closure returned `Ok(None)` — i.e. the proc-macro server acknowledged the request without ever delivering a response payload. It indicates the external proc-macro server process died, hung, or violated the legacy protocol; the input at fault is the request that went unanswered.","triggerScenarios":"Thrown at crates/proc-macro-api/src/process.rs:332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restart the proc-macro server process; it likely crashed or deadlocked (check its stderr output in the log)","Verify the proc-macro server binary version matches the protocol rust-analyzer negotiated","Check that the request being sent is actually supported by the legacy protocol version spoken by the server","Inspect stderr_errors captured alongside the empty response for the underlying process failure"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e8f7e90aa3e7b26aa9a000200f606c1078da99ec","analyzedAt":"2026-09-03T21:08:06.959Z","contentChangedAt":"2026-09-03T21:08:06.959Z","schemaVersion":2},"datasetVersion":"2026-09-11T07:07:21.782Z"}