opt-in dynamicism can produce inconsistent system states depending on eval method #1
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
qyriad/rfd-modular-dynamicism#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
consider this module tree:
specified dynamicism in this case cannot detect that
foowill need to have changes applied to it ifbar.settings.threadsis changed unless this has been explicitly written down. making value transfers of this sort safe requires that dynamic values are not used outside of the modules that declared them, otherwise a dynamic change tobarcould produce a different system config than a monolithic evaluation of the same base config and setting override would produce.we have a similar problem with types and option reuses:
in this case changes to
different.contextwould also entail changes tosomething.contextand vice versa. it is now no longer possible to apply overrides to one of these without also affecting the other, and any type-based checking approach (like inserting tagged bottom types for values during a pre-flight check phase) will not be able to find this dependency. this pattern has been used in nixpkgs in the past to share lists between services.dynamicism may be unsolvable in the nixos module system in the general case. consider the following module:
in this case a dynamic change to
foo.cmay propagate tofoo.adepending on the rest of the configuration, but it may not. in particular a later change tofoo.bmay change wherefoo.apropagates from, and bottom injection will not easily solve this becase the uses of thefoovalues are all located in thefoomodule.this is complicated further by the fact that nixos module types are themselves mergeable and depending on eval order such type merges may not be commutative.