aboutsummaryrefslogtreecommitdiff
path: root/doc/manual
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-05-26 05:15:53 +0200
committerValentin Gagarin <valentin.gagarin@tweag.io>2022-08-04 12:37:47 +0200
commit4341849193cfd9b8e1e494292516a60734dfcc53 (patch)
tree5c2ee450cdd8603a2931127290d60d5dc0dd7802 /doc/manual
parent445f753a820cb4b6076fec1d69d66c649618c4f0 (diff)
move closure property to discussion references
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/src/architecture/store/objects.md15
-rw-r--r--doc/manual/src/architecture/store/store.md23
2 files changed, 17 insertions, 21 deletions
diff --git a/doc/manual/src/architecture/store/objects.md b/doc/manual/src/architecture/store/objects.md
index f7587e112..8ab0b9368 100644
--- a/doc/manual/src/architecture/store/objects.md
+++ b/doc/manual/src/architecture/store/objects.md
@@ -35,21 +35,6 @@ A bare file or symlink can be a root file system object.
Symlinks pointing outside of their own root, or to a store object without a matching reference, are allowed, but might not function as intended.
-## Reference {#reference}
-
-A store object can reference other store objects.
-
-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.
-
-Building, copying and deleting store objects must be done in a way that obeys this property:
-
-- Build results must only refer to store objects in the closure of the build inputs.
-
-- Store objects being copied must refer to objects already in the destination store.
- Recursive copying must either proceed in dependency order or be atomic.
-
-- We can only safely delete unreferenced objects.
-
### Reference scanning
While references could be arbitrary paths, Nix requires them to be store paths to ensure correctness.
diff --git a/doc/manual/src/architecture/store/store.md b/doc/manual/src/architecture/store/store.md
index 5a0f4a2df..a3d9e2eeb 100644
--- a/doc/manual/src/architecture/store/store.md
+++ b/doc/manual/src/architecture/store/store.md
@@ -52,15 +52,26 @@ References are [opaque][opaque-data-type], [unique identifiers][unique-identifie
The only way to obtain references is by adding or building store objects.
A reference will always point to exactly one store object.
-An added store object cannot have references, unless it is a build task.
+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.
-Building a store object will add appropriate references, according to provided build instructions.
-These references can only come from declared build inputs, and are not known to build instructions a priori.
+Adding, building, copying and deleting store objects must be done in a way that obeys this property:
-A store object cannot be deleted as long as it is reachable from a reference still in use.
-Garbage collection will delete all store objects that cannot be reached from any reference in use.
+- A newly added store object cannot have references, unless it is a build task.
-<!-- more details in section on garbage collection, link to it once it exists -->
+- Build results must only refer to store objects in the closure of the build inputs.
+
+ Building a store object will add appropriate references, according to provided build instructions.
+ These references can only come from declared build inputs.
+
+- Store objects being copied must refer to objects already in the destination store.
+
+ Recursive copying must either proceed in dependency order or be atomic.
+
+- We can only safely delete store objects which are not reachable from any reference still in use.
+
+ Garbage collection will delete all store objects that cannot be reached from any reference in use.
+
+ <!-- more details in section on garbage collection, link to it once it exists -->
[garbage-collection]: https://en.m.wikipedia.org/wiki/Garbage_collection_(computer_science)
[immutable-object]: https://en.m.wikipedia.org/wiki/Immutable_object