bynk_project/lib.rs
1//! Bynk's project model (#1113, P4.0): discovery, the unit dependency graph,
2//! path resolution, cross-unit consistency checks, and the schema-registry
3//! document's read/write halves.
4//!
5//! Extracted from `bynk-emit/src/project.rs` and its `project/` submodule
6//! tree so `bynk-emit` becomes a *dependent* of this crate rather than owning
7//! this code directly (`design/tracks/project-model.md` §3, §6 row P4.0).
8//! `bynk-check`/`bynk-syntax`/grammar/AST/emitter language surface is
9//! untouched — a crate-boundary and internal-representation move, not a
10//! language change.
11//!
12//! What did **not** move (stays in `bynk-emit`, per the slice's own scope):
13//! `schema_registry::reconcile` and its helpers (`bynk_check`-coupled via
14//! `UnitTable`, pending P4.1's `bynk-check` entry point); `diagnostics::Mode`,
15//! `ErrorSink`, `ProjectAnalysis`, `ProjectFailure`, `ContextSequenceInfo`,
16//! `ContextBoundaryInfo` (facts about how the pipeline is driven/consumed,
17//! not about the project itself); `symbols` (`UnitTable`, `bynk_check`-coupled
18//! via `resolver::MethodTable`); `validate`/`tests_emit` (checking and test
19//! codegen, not project modelling).
20//!
21//! The public surface below is enumerated by hand (R10.4-style) — no blanket
22//! `pub use module::*`.
23
24pub mod consistency;
25pub mod discovery;
26pub mod graph;
27pub mod json;
28pub mod paths;
29pub mod roots;
30pub mod schema_registry;
31
32mod diagnostics;
33
34pub use consistency::{
35 check_directory_kind_consistency, check_directory_name_consistency,
36 check_group_kind_consistency, check_path_name_alignment,
37};
38pub use diagnostics::AttributedError;
39pub use discovery::{
40 ParsedFile, case_effective_tier, check_file_directory_conflicts, discover_bynk_files,
41 discover_project_files, parse_sources, read_adapter_binding, read_source,
42 suite_effective_tier_is_system,
43};
44pub use graph::{detect_consumes_cycles, detect_provider_dependency_cycles};
45pub use json::json_string;
46pub use paths::{
47 ProjectPaths, ProjectPathsError, commons_dir_for, is_multi_file_layout, is_unpinned_range,
48 normalize_rel, renamed_unit_name, render_package_json, try_read_project_paths,
49 try_read_project_paths_with, ts_output_path, unit_path_matches, worker_dir_name,
50 worker_handlers_output_path, worker_handlers_source_path,
51};
52pub use roots::{Roots, SchemaLock, UnitKind};