Skip to main content

phase_integration_bodies

Function phase_integration_bodies 

Source
pub fn phase_integration_bodies(
    integration_groups: &BTreeMap<String, Vec<usize>>,
    parsed: &[ParsedFile],
    unit_tables: &HashMap<String, UnitTable>,
    unit_consumes: &HashMap<String, Vec<String>>,
    unit_consumes_aliases: &HashMap<String, HashMap<String, String>>,
    unit_uses: &HashMap<String, Vec<String>>,
    errors: &mut Vec<CompileError>,
    refs: &mut RefSink,
    tys: &Arc<Types>,
) -> HashMap<String, CrossContextInfo>
Expand description

P5.4 (design/tracks/semantics-in-the-checker.md §6): the checking half of test integration "name" suite processing — participant inference, the system-needs-a-serialisation-edge gate, duplicate-case-name detection, the harness-root cross-context view, and per-case body type-checking (including the Wire/by Nobody tier gates). Formerly the pre-emission logic of bynk-emit’s own process_integration_tests; emission stays in bynk-emit::project::tests_emit::process_integration_tests, which calls this function for its checking half and then emits only for the groups this returns. Unlike phase_test_bodies’s ResolvedStub map, the only thing worth handing back here is the harness’s resolver::CrossContextInfo — it’s built from clone-heavy maps (harness_consumes/harness_uses), so recomputing it a second time on the emit side would be wasted work. participants/uses_targets/ case_inputs are cheap and pure (a BFS, a linear scan), so the emit-side loop recomputes those itself from parsed/unit_consumes, using the now-relocated infer_participants. bynk_check::analysis::analyse_project calls this too and discards the returned map — it never emits. Closes category 7 of bynk-check/src/analysis.rs’s own residual-gap accounting, alongside phase_test_bodies.