Skip to main content

Module discovery

Module discovery 

Source

Structs§

ParsedFile
A parsed .bynk file: its source, AST, and the two path forms it needs.

Functions§

case_effective_tier
v0.118: a case’s effective tier — its own as <tier>, else the suite default, else unit.
check_file_directory_conflicts
discover_bynk_files
discover_project_files
Slice A: the .bynk files these roots contain — the same walk compile_project performs, honouring exclude and the tool’s own out/ node_modules caches.
parse_sources
Parse already-read source text into a ParsedFile. The read happens at the call site (v0.24): the pipeline owns the text for snapshots and per-file error attribution, and the overlay supplies unsaved buffers. Slice 0: prefix is this tree’s project-root-relative include prefix (src, tests, …), empty for a single-root project. It builds each file’s identity_path; source_path stays relative to root (the tree), which is what unit validation reads. See ParsedFile.
read_adapter_binding
An adapter’s .binding.ts module: overlay-first (an open, unsaved binding buffer), else a real disk read. Content-ownership track (#1086) scope note, found under slice 5’s implementation: unlike a project’s .bynk sources — enumerable ahead of time by extension, and this track’s actual charter — a binding module’s path is only known once its declaring adapter has been parsed (adapter … { binding: "…" }), so no discovery walk (bynk-testkit, bynk-driver::discovery) can pre-populate it into a sources map the way .bynk files are. Keeping a disk-read fallback here — the CLI’s real production path has always worked exactly this way, #1077/#1081 notwithstanding — is a deliberate, narrow carve-out, not a straggler.
read_source
Read a source file from the overlay (keyed by canonicalised absolute path; falls back to the literal path so a not-yet-created overlay entry still matches). Every caller into this module now supplies a complete overlay — content-ownership track (#1086) slice 5 removed the disk-read fallback this used to have on a miss, so an incomplete overlay is a real NotFound error here, not a silent disk read.
suite_effective_tier_is_system
v0.118: whether a suite’s effective tier is system — the suite default is system, or any case opts up to system. Such a suite is emitted via the wired cross-Worker (Integration) machinery; otherwise it stays in-process (Test).