diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 12:19:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 4f57043e39396bc958a103f87466870cf8dafe00 (patch) | |
| tree | 89ec869d2e3b3eb231f14f9298bb56afa9e0f6ae /src/9p_io.zig | |
| parent | ab220b89afcfda848cf84c18cc135a2e5c392b79 (diff) | |
| download | pardes-4f57043e39396bc958a103f87466870cf8dafe00.tar.gz pardes-4f57043e39396bc958a103f87466870cf8dafe00.zip | |
A language server question that finds nothing, cannot be answered or has no room fails, and so does a write to an image's or PDF's body
Callers or Callees with nothing found, Hover or Lspwhy with no room for its pane, and a question asked of no file's pane said nothing, the 9P write succeeding; a body write to an image or PDF pane went nowhere. A write that asks a language server now waits for its answer (turn.lsp_answers), and what fails there -- nothing found, no answer, a backend's @none why, a placement with no room (ENOSPC) -- fails the write and logs its err. No diagnostics is said, not failed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/9p_io.zig')
| -rw-r--r-- | src/9p_io.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig index 72897979..96f91bc1 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -312,13 +312,19 @@ pub const Listener = struct { defer if (restoring) l.restore_writer.store(false, .release); core.fs.late_failure_len = 0; if (core.effects_len != 0) pardes.turn.awaitSettled(epoch); + if (core.fs.lsp_answer_at) |n| { + core.fs.lsp_answer_at = null; + pardes.turn.awaitLsp(n); + } // ponytail: one slot, so a failure of another client's effects that // settle in the same wait is told to this write too. if (l.core == core and core.fs.late_failure_len != 0) { const late = core.fs.late_failure[0..core.fs.late_failure_len]; // What is not there (`no such directory`) is ENOENT, as a // builtin's failure saying so is (ctl.failureErrno). - const errno = if (std.mem.indexOf(u8, late, "no such") != null or std.mem.indexOf(u8, late, "not found") != null) pardes.ctlfs.E.NOENT else pardes.ctlfs.E.IO; + const errno = if (std.mem.indexOf(u8, late, "no such") != null or std.mem.indexOf(u8, late, "not found") != null) + pardes.ctlfs.E.NOENT + else if (std.mem.indexOf(u8, late, "no space") != null) pardes.ctlfs.E.NOSPC else pardes.ctlfs.E.IO; const failed = pardes.ctlfs.failText(req.tag, errno, late); // Its err record says it (the path in it); the msg the failure // was also said as goes, as a builtin's failing a write does. |
