It turns out this code path is only used for unit tests (to ensure our JSON formats are possible to parse by other code, elsewhere). No user-facing functionality consumes this format. Therefore, let's drop the old version parsing support.
1.4 KiB
| synopsis | prs | issues |
|---|---|---|
| JSON format changes for store path info and derivations |
JSON formats for store path info and derivations have been updated with new versions and structured fields.
Store Path Info JSON (Version 2)
The store path info JSON format has been updated from version 1 to version 2:
-
Added
versionfield:All store path info JSON now includes
"version": 2. -
Structured
cafield:Content address is now a structured JSON object instead of a string:
- Old:
"ca": "fixed:r:sha256:1abc..." - New:
"ca": {"method": "nar", "hash": {"algorithm": "sha256", "format": "base64", "hash": "EMIJ+giQ..."}} - Still
nullvalues for input-addressed store objects
- Old:
Nix currently only produces, and doesn't consume this format.
Affected command: nix path-info --json
Derivation JSON (Version 4)
The derivation JSON format has been updated from version 3 to version 4:
-
Restructured inputs:
Inputs are now nested under an
inputsobject:- Old:
"inputSrcs": [...], "inputDrvs": {...} - New:
"inputs": {"srcs": [...], "drvs": {...}}
- Old:
-
Consistent content addresses:
Floating content-addressed outputs now use structured JSON format. This is the same format as
cain in store path info (after the new version).
Version 3 and earlier formats are not accepted when reading.
Affected command: nix derivation, namely it's show and add sub-commands.