Expand description
Bynk’s project model (#1113, P4.0): discovery, the unit dependency graph, path resolution, cross-unit consistency checks, and the schema-registry document’s read/write halves.
Extracted from bynk-emit/src/project.rs and its project/ submodule
tree so bynk-emit becomes a dependent of this crate rather than owning
this code directly (design/tracks/project-model.md §3, §6 row P4.0).
bynk-check/bynk-syntax/grammar/AST/emitter language surface is
untouched — a crate-boundary and internal-representation move, not a
language change.
What did not move (stays in bynk-emit, per the slice’s own scope):
schema_registry::reconcile and its helpers (bynk_check-coupled via
UnitTable, pending P4.1’s bynk-check entry point); diagnostics::Mode,
ErrorSink, ProjectAnalysis, ProjectFailure, ContextSequenceInfo,
ContextBoundaryInfo (facts about how the pipeline is driven/consumed,
not about the project itself); symbols (UnitTable, bynk_check-coupled
via resolver::MethodTable); validate/tests_emit (checking and test
codegen, not project modelling).
The public surface below is enumerated by hand (R10.4-style) — no blanket
pub use module::*.
Re-exports§
pub use consistency::check_directory_kind_consistency;pub use consistency::check_directory_name_consistency;pub use consistency::check_group_kind_consistency;pub use consistency::check_group_module_docs;pub use consistency::check_path_name_alignment;pub use discovery::ParsedFile;pub use discovery::RecoveredSources;pub use discovery::case_effective_tier;pub use discovery::check_file_directory_conflicts;pub use discovery::discover_bynk_files;pub use discovery::discover_project_files;pub use discovery::parse_sources;pub use discovery::parse_sources_recovering;pub use discovery::read_adapter_binding;pub use discovery::read_adapter_include;pub use discovery::read_source;pub use discovery::suite_effective_tier_is_system;pub use graph::detect_consumes_cycles;pub use graph::detect_provider_dependency_cycles;pub use json::json_string;pub use manifest::DependencySource;pub use manifest::DependencySpec;pub use manifest::PackageConfig;pub use manifest::RegistryConfig;pub use manifest::WorkspaceConfig;pub use manifest::read_package_config;pub use packages::GraphProblem;pub use packages::Package;pub use packages::PackageGraph;pub use packages::PackageId;pub use packages::dependency_trees;pub use packages::display_names;pub use packages::display_unit_name;pub use packages::resolve_graph;pub use packages::split_canonical;pub use paths::MANIFEST_MAP_TABLES;pub use paths::MANIFEST_TABLES;pub use paths::ProjectPaths;pub use paths::ProjectPathsError;pub use paths::TestTarget;pub use paths::UnstableConfig;pub use paths::WorkersConfig;pub use paths::check_manifest;pub use paths::check_manifest_str;pub use paths::commons_dir_for;pub use paths::duplicate_compatibility_flag_warning;pub use paths::is_multi_file_layout;pub use paths::is_unpinned_range;pub use paths::normalize_rel;pub use paths::read_unstable_config;pub use paths::renamed_unit_name;pub use paths::render_package_json;pub use paths::try_read_project_paths;pub use paths::try_read_project_paths_with;pub use paths::try_read_test_targets;pub use paths::try_read_unstable_config;pub use paths::try_read_unstable_config_with;pub use paths::try_read_workers_config;pub use paths::try_read_workers_config_with;pub use paths::ts_output_path;pub use paths::unit_path_matches;pub use paths::worker_dir_name;pub use paths::worker_file_source_path;pub use paths::worker_handlers_output_path;pub use paths::worker_handlers_source_path;pub use roots::Roots;pub use roots::SchemaLock;pub use roots::UnitKind;pub use workspace::Workspace;pub use workspace::find_parent_workspace;pub use workspace::is_workspace_root;pub use workspace::load_workspace;
Modules§
- assets
- #1883 (static assets), slice 1b: the project’s assets folder — the one
directory an
asset name = "path"declaration may name a file in — and the walk that reads it. - consistency
- discovery
- graph
- json
- The one JSON string escaper for every manifest
bynk-emithand-renders. - lock
- Packaging slice 2b (#2240, track
design/tracks/packaging.md§5.2, §6.4):bynk.lockand the store. - manifest
- Packaging slice 1 (#2207, track
design/tracks/packaging.md§3, §4, §6.2): thebynk.tomltables that give a project a package identity and group projects into a workspace —[package],[dependencies],[dev-dependencies],[registries]and[workspace]. - manifest_
schema - #2096: the JSON Schema types for the
bynk.tomltables this crate checks. - packages
- Packaging slice 2a (#2223, track
design/tracks/packaging.md§3.3, §6.3): the dependency graph of a project’s path dependencies. - parse_
cache - P8.4 (#1515): a durable path↔
FileIdinterning table plus one shared, content-keyed parse cache — settled by ADR 0413 as the fix for R3.13’s own file level. Replacesbynk-ide’sPROJECT_UNIT_CACHE(bynk-checkcannot depend onbynk-ide, so the cache the diagnostics path (bynk_check::analysis::analyse_project→phase_parse→crate::discovery::parse_sources) actually needs has to live here, one layer down) and givesbynk_check::project_model::phase_parseaFileIdthat survives across separate analysis calls instead of resetting to zero on every one ([DECISION B]). - paths
- roots
- schema_
registry - Events track, slice 3c (#980): the cross-build schema registry’s document shape and (de)serialisation.
- workspace
- Packaging slice 1 (#2207, decision C): workspaces.
Structs§
- Attributed
Error - v0.24 (ADR 0052): a compile error attributed — where possible — to the
project-relative source file it belongs to, tagged at the collection
point (the phase that produced it knows which file it was processing).
Noneis the project-level bucket: validations spanning files (group/cycle/directory consistency) with no single owning file.
Enums§
- Label
File - Which file an
AttributedError’s secondary label lies in.