Skip to main content

composition_root_trigger

Function composition_root_trigger 

Source
pub fn composition_root_trigger(
    kinds: &BTreeMap<String, UnitKind>,
    unit_consumes: &HashMap<String, Vec<String>>,
    unit_consumes_aliases: &HashMap<String, HashMap<String, String>>,
    unit_tables: &HashMap<String, UnitTable>,
    unit_callees: &UnitCallees,
    unit_flattened: &HashMap<String, HashMap<String, String>>,
) -> Option<(String, String)>
Expand description

The context that makes a bundle emit its composition root (compose.ts, composeApp) and what it does that needs one, phrased to follow the context’s name, or None when the bundle has no root. Shared by the driver’s emit_composition_root and phase_bundle_composition_unprovided (which both bynk check and the editor’s analysis run), so the check and the emitter cannot disagree about whether there is a root: composeApp builds every context’s deps itself, so once there is one the host cannot supply a capability through __makeSurface(deps), and a required local capability needs a provider, as it does on Workers.