add note on self-references and cycles

Co-authored-by: John Ericson <git@JohnEricson.me>
This commit is contained in:
Valentin Gagarin 2023-01-17 12:33:23 +01:00
parent 59f03437c2
commit 9be3c6c7c7

View file

@ -118,9 +118,9 @@
A [store object] `O` is said to have a *reference* to a store object `P` if the [store path] of `P` appears in the contents of `O`.
The *references* of a store object `O` are the set of store objects to which `O` has a reference.
Source files have no references.
A [store derivation] can only reference source files and other store derivations, including itself.
In contrast, a store object that was produced from a [derivation] can only reference other "derived" store objects.
Store objects can refer to both other store objects and themselves.
References from a store object to itself are called *self-references*.
References other than a self-reference must not form a cycle.
[reference]: #gloss-reference