Skip to main content

phase_event_subscriptions

Function phase_event_subscriptions 

Source
pub fn phase_event_subscriptions(
    parsed: &[ParsedFile],
    groups: &BTreeMap<String, Vec<usize>>,
    kinds: &BTreeMap<String, UnitKind>,
    unit_tables: &HashMap<String, UnitTable>,
    unit_consumes: &HashMap<String, Vec<String>>,
    unit_uses: &HashMap<String, Vec<String>>,
    errors: &mut ErrorSink,
)
Expand description

Events track, slice 0 (spine #936): a from Events(E) subscription must name a real, declared event — owned either by this context or by a context it consumes (mirroring discover_event_subscribers’s own ownership resolution, project.rs, which silently drops an unresolvable subscription rather than diagnosing it). Runs at the project-wide phase (needs unit_tables + unit_consumes together, unlike the local, per- context check_service_protocols), alongside the other cross-unit checks that need the same two maps.

P5.1 (design/tracks/semantics-in-the-checker.md §6): relocated verbatim from bynk-emit/src/project/validate.rs’s check_event_subscriptions — category 4 of analysis.rs’s own seven-category accounting, the third live editor-diagnostics regression this track closes.