Expand description
The project-level analysis entry point (P4.1, #1115): discovery
(bynk-project) → parse → resolve → check, returning the bynk-ide-facing
analogue of bynk-emit’s ProjectAnalysis — without ever emitting.
bynk-ide is repointed at analyse_project as of P4.2 (#1122) —
bynk_emit::project::analyse_project_with is no longer reachable from
bynk-ide at all (it has no bynk-emit dependency left). This entry
point is what every real caller uses today; the differential fixture
(bynk-check/tests/differential_analysis.rs) still pins it against
analyse_project_with directly (both remain real, exercised paths —
bynk-emit’s own CLI build still drives run_checks), so a future
divergence between the two is still caught even though only one of them
feeds the editor now.
§The residual gap
This entry point was diagnostically faithful to bynk-emit’s
run_checks’s Mode::Analyse arm minus seven categories of
whole-project checking at P4.2 (recorded on the tracking issue’s own
scope-correction comments, not silently assumed). Categories 2, 3, 4 and 6
closed at P5.0/P5.1/P5.2 (design/tracks/semantics-in-the-checker.md §6)
— crate::project_model::phase_messages_bundles/
crate::project_model::phase_locale_bundle_ambiguity/
crate::project_model::phase_event_subscriptions/
crate::project_model::phase_function_type_boundaries are now called
from analyse_project at the same points run_checks calls them.
Categories 1 and 5 closed at P5.3, structurally rather than observably —
both were already unreachable from the editor before P4.2 even shipped,
so porting them changed nothing observable. Category 7 closed at P5.4, the
last of the seven and the one this doc comment’s own author flagged as
needing more care (§9 of the design doc) — see below. All seven
categories are now closed:
Schema-registry reconciliation— closed at P5.3.crate::schema_registry::reconcileis now called fromanalyse_project, right aftercrate::project_model::phase_validate_providers(the same relative pointrun_checkscalls it). Still unreachable on this path — it only ever fires underSchemaLock::On, and this entry point has no on-disk lock concept at all, so it always reconciles against an empty registry, which every event baselines against silently — so relocating it changed nothing observable; it now simply originates inbynk-check, per R3.5.— closed at P5.0, see above.messagesbundle validationLocale bundle ambiguity— closed at P5.0, see above.Event-subscription validation— closed at P5.1, see above.Platform-lock enforcement— closed at P5.3.crate::project_model::phase_platform_lockis now called fromanalyse_project, right after the per-unit compose/check loop (the same relative pointrun_checkscalls it, gated the same way on a clean error sink so far). Still unreachable on this path, for the same reason as before the relocation:analyse_projecthardcodesPlatform::default()(Cloudflare) andBuildTarget::Bundle, andbynk.cloudflareis the only platform-native unit that exists (firstparty::platform_of) — solock_violationcan never find a native platform disagreeing with the selected one, for any project, on this path. No fixture can observe this category regressing (or improving) because it never fired through this path to begin with, both before and after this relocation.Function-type-boundary checks— closed at P5.2. Formerly reached, inbynk-emit, only throughphase_group’s optional boundary-check hook (Somefromrun_checks,Nonehere); the hook is gone —crate::project_model::phase_groupnow callscrate::project_model::phase_function_type_boundariesdirectly, at the exact point the hook used to fire, so both callers see it in the same diagnostic-ordering position as before.Test/integration-suite processing(process_tests/process_integration_tests) — closed at P5.4. Unlike categories 2-6, these run unconditionally inrun_checks, inMode::Analysetoo, and push into the same shared error sink (bynk-emit’s owncheck_project_reports_a_test_body_error_past_an_earlier_structural_errorpins abynk.types.let_annotation_mismatchoriginating inside asuite/test integrationbody). The two functions were emission-coupled (CompiledFile,RunnableTest,ImportExt,contracts, a sharedemitted_barrelsset) deeply enough that P5.4 split them at the check/emit boundary rather than porting the whole thing: their checking half relocated tocrate::test_suites::phase_test_bodies/crate::test_suites::phase_integration_bodies, now called fromanalyse_projectright after the per-unit compose/check loop (the same relative pointrun_checkscalls the originals, unconditionally — unlike categories 2-6, neither is gated on a clean error sink), while emission itself stays inbynk-emit::project::tests_emit, which now calls the relocated checking phase too rather than duplicating it. Both functions still take&mut RefSink, so every binding edge inside a.bynksuite file is populated here again too — go-to-definition inside a test file works through this entry point once more.
Emission itself is orthogonal rather than a gap: this entry point never
emits, by construction (it has no BuildTarget/ImportExt/contracts
concept at all), so there is no diagnostic-agreement question to ask of it.
A fixture that exercises none of the seven categories above sees identical
diagnostics from this entry point and from analyse_project_with — that
is what the differential fixture’s two clean/broken cases assert. A third
case (new_entry_point_omits_test_body_diagnostics) pinned category 7’s
divergence directly; now that P5.4 closed it, that test asserts parity
instead (see its own doc comment).
§Two sites outside the seven-category accounting
bynk-check/src/analysis.rs’s own seven categories were run_checks’s
whole-project checks; two more registered diagnostics were still
constructed in bynk-emit and outside that accounting, found and closed
at P5.5 (design/tracks/semantics-in-the-checker.md §6, §9):
bynk.project.schema_registry_corrupt— a malformed on-diskbynk.schema.lock.crate::schema_registry::parse_or_diagnosenow constructs it. Unreachable from this entry point, same reason as category 1: no on-disk lock concept exists here.bynk.secrets.computed_name— seecrate::project_model::phase_secrets_computed_name’s own doc. Unlike the seven categories (scoped and confirmed live gaps or confirmed gap-in-name-only by this settling pass), this one’s reachability from this entry point was still open at settling time — §9 named it a risk rather than a scoped item. It resolved the same way categories 1 and 5 did: gap-in-name-only, sincerun_checks’s own gate (target == BuildTarget::Workers) can never pass against this entry point’s hardcodedBuildTarget::Bundle.
Structs§
- Context
Boundary Info - #855: the per-unit slice of resolution the wire-contract peek needs —
see
ProjectAnalysis::boundary_info. A sibling ofContextSequenceInfo, not a field on it: that struct is named and documented for #846, and this is a separate retained table serving a separate query (hover/panel over a single handler’s boundary, not the sequence-diagram classifier). Moved verbatim (Decision C, #1115). - Context
Sequence Info - #846: the per-unit slice of resolution the sequence-diagram classifier
needs — see
ProjectAnalysis::sequence_info. Moved verbatim (Decision C, #1115) frombynk-emit/src/project/diagnostics.rs. - Project
Analysis - v0.24: the analyse-mode result — every discovered file’s analysed text
snapshot (positions must convert against the text that was analysed, not
a newer buffer) plus the attributed diagnostics. Moved verbatim (Decision
C, #1115) from
bynk-emit/src/project/diagnostics.rs;bynk-emitre-exports this type at its old path (bynk_emit::project::ProjectAnalysis) sobynk-ide’s existing destructuring needs no field-by-field rewrite.
Functions§
- analyse_
project - The
bynk-check-native discovery→parse→resolve→check entry point (P4.1, #1115) — see this module’s own doc comment for the documented residual gap againstbynk-emit’sanalyse_project_with. Mirrorsanalyse_project_with’s own call shape exactly where the two overlap:BuildTarget::Bundle-equivalent (this entry point has no build target at all — it never emits),Platform::default(), no schema-registry lock.