From db13b6c0920b1d5f141ffbcab485f42b2695d1ae Mon Sep 17 00:00:00 2001 From: Vova Kryachko Date: Tue, 19 Nov 2024 12:28:42 -0500 Subject: chore(tvix/nix-daemon): Implement STDERR_READ protocol When sending nars over the wire to the nix-daemon, nix protocol versions 1.21 to 1.23 use this framing protocol. This change implements an AsyncRead for this protocol, to be used in AddToStoreNar and any other operations when necessary. Change-Id: I571f1adbb2343c14c98503d1a2c12eea4c783ec9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12813 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/docs/src/nix-daemon/logging.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/docs') diff --git a/tvix/docs/src/nix-daemon/logging.md b/tvix/docs/src/nix-daemon/logging.md index b6522c867100..e753279fa7e9 100644 --- a/tvix/docs/src/nix-daemon/logging.md +++ b/tvix/docs/src/nix-daemon/logging.md @@ -53,9 +53,9 @@ Normal string log message. ### `STDERR_READ` Reader interface used by ImportsPaths and AddToStoreNar (between 1.21 and 1.23). -It works by sending a desired buffer length and then on the receiver stream it -reads bytes buffer of that length. If it receives 0 bytes it sees this as an -unexpected EOF. +It works by sending a *desired* buffer length and then on the receiver stream it +reads the *actual* buffer length followed by a bytes buffer of that length padded to +8 bytes. If it receives 0 bytes it sees this as an unexpected EOF. - 0x64617461 :: [UInt64][se-UInt64] (hardcoded, 'data' in ASCII) - desiredLen :: [Size][se-Size] -- cgit 1.4.1