Skip to main content

Module paths

Module paths 

Source

Structs§

ProjectPaths
v0.113 (DECISION S): the project’s source tree, read from bynk.toml’s [paths] section. Test-ness is a property of the suite declaration, not of a directory, so the layout is a flat include list of trees to compile and an exclude list of subtrees to skip — not the role-named src/tests split. Each include entry is a root walked for .bynk files; a file’s identity path is relative to the include root that contains it.

Enums§

ProjectPathsError
A problem in bynk.toml that try_read_project_paths surfaces instead of silently falling back to the conventional layout.

Functions§

commons_dir_for
is_multi_file_layout
v0.132: does rel_path (src-stripped) place qualified_name under a directory of that name — the multi_file_match branch of unit_path_matches?
is_unpinned_range
v0.17 [DECISION L] stub: a version range is unpinned — and rejected — when it is empty, */x/latest, or otherwise carries no concrete version number. A pinned range names at least one digit (^5, ~1.2, 1.2.3, >=1.0 <2). No allow-list or registry check yet.
normalize_rel
Normalise a relative path by resolving . and .. components, so a binding clause like ./tokens.binding.ts beside src/tokens.bynk yields the output path tokens.binding.ts.
renamed_unit_name
#302: the qualified name a file moved from old_rel to new_rel should now declare, preserving whichever unit_path_matches arrangement old_rel used to satisfy against old_name — the dotted stem for a single-file unit, or the dotted parent-directory for one file of a multi-file unit. Returns None if old_rel/old_name don’t actually satisfy either arrangement (a pre-existing inconsistency the caller should not guess at).
render_package_json
Render a minimal package.json carrying the adapter-declared dependencies.
try_read_project_paths
Read bynk.toml’s [paths] section, surfacing a malformed manifest — a parse failure or an unrecognised [paths] key — as an error instead of silently falling back to the conventional layout (the previous read_project_paths total form’s behaviour, R3.8 — deleted in favour of this at all 18 of its callers, #1113).
try_read_project_paths_with
Like try_read_project_paths, but honours overlay for bynk.toml itself, the same way discovery::read_source does for every other file.
ts_output_path
unit_path_matches
v0.9.1: shared between source-unit and test-unit path validation. The caller decides which root to strip from the file path before calling.
worker_dir_name
v0.8: directory name of a Worker for a given context, with dots replaced by dashes (commerce.paymentcommerce-payment).
worker_handlers_output_path
v0.8: project-relative output path of the workers-mode handlers file.
worker_handlers_source_path
v0.8: project-relative synthetic source path of the workers-mode handlers file for a given context. Used so the emitter’s relative-import machinery resolves correctly against the workers layout.