From 843288a451461610f67798af2598a2034668153a Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Thu, 26 May 2022 05:16:33 +0200 Subject: [PATCH] add subsections for objects and references group description of data instead of spreading it across the section. that should help direct skimming. as it turns out, people do not actually read any of that. --- doc/manual/src/architecture/store/store.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/manual/src/architecture/store/store.md b/doc/manual/src/architecture/store/store.md index a3d9e2eeb..de12ac1dc 100644 --- a/doc/manual/src/architecture/store/store.md +++ b/doc/manual/src/architecture/store/store.md @@ -2,6 +2,8 @@ A Nix store is a collection of *store objects*. +## Store Object + A store object can hold - arbitrary *data* @@ -9,6 +11,16 @@ A store object can hold Nix makes no distinction if store objects are build inputs, build results, or build tasks. +Store objects are [immutable][immutable-object]: once created, they do not change until they are deleted. + +## Reference + +References to store objects are [opaque][opaque-data-type], [unique identifiers][unique-identifier]: +The only way to obtain references is by adding or building store objects. +A reference will always point to exactly one store object. + +## Operations + A Nix store can *add*, *retrieve*, and *delete* store objects. [ data ] @@ -46,11 +58,7 @@ As it keeps track of references, it can [garbage-collect][garbage-collection] un [ store ] --> collect garbage --> [ store' ] -Store objects are [immutable][immutable-object]: once created, they do not change until they are deleted. - -References are [opaque][opaque-data-type], [unique identifiers][unique-identifier]: -The only way to obtain references is by adding or building store objects. -A reference will always point to exactly one store object. +## Closure Nix stores have the *closure property*: for each store object in the store, all the store objects it references must also be in the store.