chore(tvix/docs): Small changes to Nix Daemon protocol description

I found some more operations that are obsolete and a few missing
fields. I also did some small changes to make handshake description
more consistent.

Change-Id: I9f853a37e9d50621491f31ea71879d6a600046e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12724
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Brian Olsen 2024-11-03 14:24:19 +01:00
parent f02bc522b6
commit 28dbf5f0eb
5 changed files with 15 additions and 14 deletions

View file

@ -52,7 +52,7 @@ So this means that any version of Nix 2.x can't talk to Nix 0.x.
| QueryDeriver | 18 | [6d1a1191b0][6d1a1191b0] || 0.11 | Obsolete [e0204f8d46][e0204f8d46]<br>Nix 2.0 Protocol 1.16 |
| SetOptions | 19 | [f3441e6122][f3441e6122] || 0.11 ||
| CollectGarbage | 20 | [a72709afd8][a72709afd8] | 1.02 | 0.12 ||
| QuerySubstitutablePathInfo | 21 | [03427e76f1][03427e76f1] | 1.02 | 0.12 ||
| QuerySubstitutablePathInfo | 21 | [03427e76f1][03427e76f1] | 1.02 | 0.12 | Obsolete Nix 1.2 Protocol 1.12 |
| QueryDerivationOutputs | 22 | [e42401ee7b][e42401ee7b] | 1.05 | 1.0 | Obsolete [d38f860c3e][d38f860c3e]<br>Nix 2.4 Protocol 1.22* |
| QueryAllValidPaths | 23 | [24035b98b1][24035b98b1] | 1.05 | 1.0 ||
| *QueryFailedPaths | 24 | [f92c9a0ac5][f92c9a0ac5] | 1.05 | 1.0 | Removed [8cffec848][8cffec848]<br>Nix 2.0 Protocol 1.16 |
@ -61,7 +61,7 @@ So this means that any version of Nix 2.x can't talk to Nix 0.x.
| ImportPaths | 27 | [273b288a7e][273b288a7e] | 1.09 | 1.0 | Obsolete [538a64e8c3][538a64e8c3]<br>Nix 2.0 Protocol 1.17 |
| QueryDerivationOutputNames | 28 | [af2e53fd48][af2e53fd48]<br>([194d21f9f6][194d21f9f6]) | 1.08 | 1.0 | Obsolete<br>[045b07200c][045b07200c]<br>Nix 2.4 Protocol 1.21 |
| QueryPathFromHashPart | 29 | [ccc52adfb2][ccc52adfb2] | 1.11 | 1.1 ||
| QuerySubstitutablePathInfos | 30 | [eb3036da87][eb3036da87] | 1.12* | 1.2 ||
| QuerySubstitutablePathInfos | 30 | [eb3036da87][eb3036da87] | 1.12* | 1.2 | Obsolete Nix 2.0, Protocol 1.19*|
| QueryValidPaths | 31 | [58ef4d9a95][58ef4d9a95] | 1.12 | 1.2 ||
| QuerySubstitutablePaths | 32 | [09a6321aeb][09a6321aeb] | 1.12 | 1.2 ||
| QueryValidDerivers | 33 | [2754a07ead][2754a07ead] | 1.13* | 1.3 ||

View file

@ -3,7 +3,7 @@
## client -> server
- 0x6e697863 :: [Int](#int) (hardcoded, 'nixc' in ASCII)
## server -> client
## client <- server
- 0x6478696f :: [Int](#int) (hardcoded, 'dxio' in ASCII)
- protocolVersion :: [Int](#int)
@ -19,7 +19,7 @@
- reserveSpace :: [Bool](#bool) (obsolete, ignored and set to false)
## server -> client
## client <- server
### If clientVersion is 1.33 or later
- nixVersion :: String
@ -27,6 +27,6 @@
### If clientVersion is 1.35 or later
- trusted :: OptTrusted
## server -> client
## client <- server
- send logs
- [operation](./operations.md) :: Int

View file

@ -96,6 +96,7 @@ Implemented in protocol 1.20. When backwards compatible with older versions of
the protocol and this message would have been sent it is instead ignored.
- 0x53544f50 :: [UInt64][se-UInt64] (hardcoded, 'STOP' in ASCII)
- act :: [UInt64][se-UInt64]
### `STDERR_RESULT`

View file

@ -4,7 +4,6 @@
| Operation | Id |
| ----------------------------------------------------------- | -- |
| [IsValidPath](#isvalidpath) | 1 |
| [HasSubstitutes](#hassubstitutes) | 3 |
| [QueryReferrers](#queryreferrers) | 6 |
| [AddToStore](#addtostore) | 7 |
| [BuildPaths](#buildpaths) | 9 |
@ -40,6 +39,7 @@
| Operation | Id |
| ----------------------------------------------------------- | -- |
| [HasSubstitutes](#hassubstitutes) | 3 |
| [QueryPathHash](#querypathhash) | 4 |
| [QueryReferences](#queryreferences) | 5 |
| [AddTextToStore](#addtexttostore) | 8 |

View file

@ -144,11 +144,11 @@ An [Int](#int) enum with the following possible values:
### OptTrusted
An [UInt8](#uint8) optional enum with the following possible values:
| Name | Int |
| ---------------- | --- |
| None | 0 |
| Some(Trusted) | 1 |
| Some(NotTrusted) | 2 |
| Name | Int |
| ---------- | --- |
| Unknown | 0 |
| Trusted | 1 |
| NotTrusted | 2 |
## Bytes serializers
@ -340,15 +340,15 @@ Optional microseconds.
- env :: [Map](#map-of-x-to-y) of [String](#string) to [String](#string)
### TraceLine
- havePos :: [Size](#size) (hardcoded to 0)
- havePos :: [Size](#size) (hardcoded to 0 with assert on read)
- hint :: [String](#string) (If logger is JSON, invalid UTF-8 is replaced with U+FFFD)
### Error
- type :: [String](#string) (hardcoded to `Error`)
- type :: [String](#string) (hardcoded to `Error` with assert on read)
- level :: [Verbosity](#verbosity)
- name :: [String](#string) (removed and hardcoded to `Error`)
- msg :: [String](#string) (If logger is JSON, invalid UTF-8 is replaced with U+FFFD)
- havePos :: [Size](#size) (hardcoded to 0)
- havePos :: [Size](#size) (hardcoded to 0 with assert on read)
- traces :: [List](#list-of-x) of [TraceLine](#traceline)
## Field