1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 00:16:11 -04:00

Document --json in diff-closures

Signed-off-by: Pamplemousse <git@xaviermaso.com>
This commit is contained in:
Pamplemousse 2022-11-01 09:16:45 +01:00
parent 4422e61a1b
commit 5915951cbf

View file

@ -24,28 +24,50 @@ of packages, as well as changes in store path sizes.
For each package name in the two closures (where a package name is
defined as the name component of a store path excluding the version),
if there is a change in the set of versions of the package, or a
change in the size of the store paths of more than 8 KiB, it prints a
line like this:
it returns information about the change in the set of versions of the
package, and the change in the size of the store paths.
```console
dolphin: 20.08.1 → 20.08.2, +13.9 KiB
```
No size change is shown if it's below the threshold. If the package
does not exist in either the *before* or *after* closures, it is
represented using `∅` (empty set) on the appropriate side of the
arrow. If a package has an empty version string, the version is
rendered as `ε` (epsilon).
If the package does not exist in either the *before* or *after*
closures, it is represented using `∅` (empty set) on the appropriate
side of the arrow. If a package has an empty version string, the
version is rendered as `ε` (epsilon).
There may be multiple versions of a package in each closure. In that
case, only the changed versions are shown. Thus,
```console
libfoo: 1.2, 1.3 → 1.4
1.2, 1.3 → 1.4
```
leaves open the possibility that there are other versions (e.g. `1.1`)
that exist in both closures.
## Regular output
The regular output prints lines like this:
```console
dolphin: 20.08.1 → 20.08.2, +13.9 KiB
```
No size change is shown if it's below the 8 KiB threshold.
## JSON output
With `--json`, the output is in a JSON representation suitable for automatic
processing by other tools.
The printed result looks like this:
```json
{
"dolphin": {
"after": "20.08.1",
"before": "20.08.2",
"sizeDelta": 13900
},
...
}
```
)""