Document import and facade boundaries
This commit is contained in:
@@ -42,6 +42,17 @@ directory can be treated as optional, while enumeration and close failures
|
||||
remain selection errors, including errors from the standard `fs.ReadDir`
|
||||
fallback.
|
||||
|
||||
Glob selection keeps traversal coordination in `selectGlobImportCandidates`:
|
||||
it advances literal and patterned segments, reads directories, unions and sorts
|
||||
candidates, validates final targets, then applies exclusions and requiredness.
|
||||
For each patterned directory entry, `prepareGlobEntry` handles matching and
|
||||
hidden filtering, containment, target and link inspection, intermediate-directory
|
||||
eligibility, host/native access-path selection, and candidate identity and label.
|
||||
It returns a candidate, an ordinary skip, or a diagnostic without mutating the
|
||||
selector's candidate set or traversal state. Directory entry preparation remains
|
||||
separate because its matching, absence, recursion, and traversal-state rules
|
||||
differ.
|
||||
|
||||
Acquisition remains authored: declarations are visited in source order and each
|
||||
selected candidate set in namespace-path lexical order. This preserves source
|
||||
records, IDs, source-local version checks, and callback ordering. The acquired
|
||||
|
||||
@@ -20,9 +20,13 @@ Implemented component owners:
|
||||
inheritance and decoding, before application resolution. The engine also owns
|
||||
shared source-version checking with sanitized declaration evidence.
|
||||
Explicit import discovery supports declared paths, directory searches, and
|
||||
globs; load-wide defaults and source-local empty-selection evidence cross the
|
||||
root facade without changing acquisition order. Import and inheritance
|
||||
resolution share dependency-ready scheduling within their composition scopes.
|
||||
globs; root-owned defaults are converted to the engine's single defaults input
|
||||
and snapshotted during load preflight before acquisition, while source-local
|
||||
empty-selection evidence crosses the facade without changing acquisition
|
||||
order. The root constructs placement directly on engine options and inputs
|
||||
using explicit enum conversion; public types and fields remain root-owned.
|
||||
Import and inheritance resolution share dependency-ready scheduling within
|
||||
their composition scopes.
|
||||
It retains each source's effective placement alongside physical source
|
||||
identity and owns schema
|
||||
inspection, lifecycle coordination, callback auditing,
|
||||
@@ -91,8 +95,14 @@ bounded algorithms.
|
||||
|
||||
## Implementation flow
|
||||
|
||||
The root facade converts caller-owned values into engine-owned requests. The
|
||||
ordinary and grouped entry points share a normalized `loadRequest`: see
|
||||
The root facade converts caller-owned values into engine-owned requests. Its
|
||||
`ImportDefaults` conversion maps fields without taking ownership; engine load
|
||||
preflight snapshots the defaults once before source acquisition or callbacks.
|
||||
Ordinary and grouped loading then carry that read-only value through their
|
||||
normalized `loadRequest` and acquisition policy, while declaration resolution
|
||||
copies values needed by its independently owned effective policy. Placement is
|
||||
constructed directly on the engine's options and input records after explicit
|
||||
root-to-engine enum conversion. See
|
||||
[`lifecycle.go`](../../lifecycle.go), [`layered.go`](../../layered.go), and
|
||||
[`load_request.go`](../../internal/engine/load_request.go). Load-wide definition,
|
||||
version, default-import, and override policy stays distinct from each input's
|
||||
|
||||
Reference in New Issue
Block a user