Schedule ordinary import contributions by dependency

This commit is contained in:
2026-10-19 19:29:35 +00:00
parent 91ab37a39d
commit 5ed0f55970
7 changed files with 159 additions and 13 deletions

View File

@@ -930,12 +930,17 @@ directive keys in root files and imported fragments, and rename any application
fields previously named `configkit` to avoid the newly reserved key.
Path declarations use slash-separated relative paths. Absolute paths and network
URLs are invalid. Each path resolves from its declaring file's canonical directory,
and files are traversed depth-first in declaration order: a file contributes its own
body before its imports. Order stabilizes source records and diagnostics but never
permits replacement. Required missing paths fail; `optional: true` suppresses only
target nonexistence, not invalid paths, containment failures, directories,
permissions, parse errors, or composition errors.
URLs are invalid. Each path resolves from its declaring file's canonical directory.
Acquisition remains depth-first in declaration order, preserving source-record and
version-callback order. Ordinary mapping contributions in a main tier are assembled
dependency-first: ConfigKit selects the lexically smallest stable source key among
the contributions whose imports are complete. Independent branches may interleave,
and the main body may be assembled after its imports. Sequence-item contributions
retain their declaration order and local helper scope; they are not flattened into
this ordinary mapping schedule. Assembly order never permits replacement. Required
missing paths fail; `optional: true` suppresses only target nonexistence, not invalid
paths, containment failures, directories, permissions, parse errors, or composition
errors.
Glob declarations use the slash-based Go `path.Match` grammar: `*`, `?`, character
classes, and backslash escapes are supported, while recursive `**` syntax is invalid.