Repository navigation
Record how each configuration selected its modules - #127
Merged
Merged
Conversation
The manifest of each configuration now carries `moduleImports`, the
account of its module selection:
- `act`: `default` when it took the default of its class, `appended`
when it gave `extraModuleImports` alone, and `reset` when it gave
`moduleImports`, which replaces the default;
- `position`: the file and line number where it gave `moduleImports`
or `extraModuleImports`;
- `default`: the default in force, each entry with its registry key,
the level that added it (the name path of a level that gave it
through `caisson.forChildren.extraDefaultModuleImports`) and the file
that defines it;
- `selected`: the registry keys of the modules it selected.
`mkModuleConfiguration` takes `selection = { class; args; }` and
records the account through caisson-core's `recordFromEvaluation`, and
every integration passes its class and its arguments. A level's
additions to the default now reach caisson-core as
`{ select; file; }`, with the file that defines them, and caisson-core
adds the level. caisson is pinned to the caisson-core branch that
records them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns came from Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on nix-caisson/caisson-core#52, merged. This branch pins caisson-core to main, which has it.
The manifest of each configuration now carries
moduleImports, the account of its module selection that design section 5 asks for. It answers "why is this module here":act:defaultwhen the configuration took the default of its class,appendedwhen it gaveextraModuleImportsalone, andresetwhen it gavemoduleImports;position: the file and line number where it gave that argument;default: the default in force, each entry with its registry key, the level that added it and the file that defines it;selected: the registry keys of the modules it selected.For the pinned-world machine, the account reads:
moduleImports = _modules: [ ], so its record isact = "reset", withtests/pinned-world/default.nixand the line number.act = "default", withmodules.nixos.caisson/defaultfrom the class default.modules.homeManager.nixos-parent, added at[ { system x86_64-linux } { nixos probe } ]frommodules/nixos/default/caisson.How.
mkModuleConfigurationtakesselection = { class; args; }, and every integration passes its class and its arguments. The newselectionAccountOfworks out the account, and the builder records it through caisson-core'srecordFromEvaluation. EachforChildren.extraDefaultModuleImportsaddition now reaches caisson-core as{ select; file; }, with the file that defines it, and caisson-core adds the level.moduleImportsOfreadsselectfrom each entry.inSource,registryPartsOfand the newregistryKeyOfmoved out ofdeclarationEventsOfso both can use them.Test. The pinned-world test
selectionsRecordHowModulesWereChosenchecks the three accounts above.nix flake checkpasses locally, including the VM tests and the evaluation-cost gate. No workspace consumer reads a manifest'sdefaultModuleImports, the field whose shape changed.The docs are in nix-caisson/nix-caisson.github.io#82.
🤖 Generated with Claude Code