Repository navigation
Record where each default selection came from, and fields an evaluation computes - #52
Merged
Merged
Conversation
…aluation computes
Each entry of a manifest's `defaultModuleImports` is now a record,
`{ select; file; level; }`, not a bare selection function: `select`
is the selection, `file` the file that gave it, as the integration of
the level records it, and `level` the name path of that level, which
caisson-core adds when it passes the default beneath. An integration
gives its additions in `forChildren.extraDefaultModuleImports` as
`{ select; file; }`.
`mkConfiguration` takes `recordFromEvaluation`, the names of fields an
evaluation computes for its manifest, and `evaluate` returns their
values under `record`. The names are declared because the names of a
manifest's fields are known before anything evaluates. Each view
records what its evaluation returned. As with `record`, a name
mkConfiguration writes is refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
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.
Two changes that let caisson record how a configuration selected its modules, the
moduleImportsanddefaultModuleImportsfields of design section 5.defaultModuleImportsis now{ select; file; level; }instead of a bare selection function.selectis the selection, andfilethe file that gave it, as the integration of that level records it.levelis the name path of the level, which caisson-core adds when it passes the default beneath. An integration gives its additions inforChildren.extraDefaultModuleImportsas{ select; file; }.recordFromEvaluation.mkConfigurationtakes the names of fields an evaluation computes for its manifest, andevaluatereturns their values underrecord. The names are declared up front because a manifest's field names must be known before anything evaluates: the evaluation reads its own manifest, so names that depended on it would recurse. Each view records what its own evaluation returned. As withrecord, a name mkConfiguration writes is refused.The
eventsparagraph that #51 added to themkConfigurationcomment had landed in the middle of theforChildrenparagraph. It now follows it.Tests.
lifecycleDefaultAdditionsReachWhatIsBeneathgives its additions as records, and checks thefileandlevelof each entry three levels down.lifecycleAnEvaluationRecordsTheFieldsItsIntegrationNameschecks that each view records what its own evaluation returned, and that naminghistoryis refused.The hermetic suite passes, 129 tests, and so does
nix flake check.nix-caisson/caisson#127 uses both.
🤖 Generated with Claude Code