Documentation
¶
Overview ¶
Package chainresolver resolves the ordered list of files that form the chain for a given target logical name.
Spec ref: ROOT/tech_design/internal/chain_resolver § "Intent"
The chain is split into three parts:
- Ancestors: ancestor nodes from ROOT down to (but not including) the target.
- Target: the target node itself.
- Dependencies: nodes/files referenced via depends_on in the target's frontmatter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
Chain holds the resolved chain for a target logical name, separated into ancestors, the target itself, and its dependencies.
Spec ref: ROOT/tech_design/internal/chain_resolver § "Types"
func ResolveChain ¶
ResolveChain builds the full chain for the given targetLogicalName.
The algorithm is:
- Walk upward via ParentLogicalName to collect all ancestor logical names plus the target itself, then sort alphabetically. The last entry is the Target; the rest are Ancestors.
- Read the target's frontmatter (and, for TEST/ nodes, also the parent leaf node's frontmatter) to collect depends_on entries, then build Dependencies.
Spec ref: ROOT/tech_design/internal/chain_resolver § "Algorithm"
Click to show internal directories.
Click to hide internal directories.