Skip to main content

called_cross_context_services

Function called_cross_context_services 

Source
pub fn called_cross_context_services(
    table: &UnitTable,
    consumed: &[String],
    callees: Option<&HashMap<ExprId, Callee>>,
) -> BTreeMap<String, BTreeSet<String>>
Expand description

v0.177 (#643, review of #658): the cross-context services a context actually calls, as consumed context → service names.

This is not the same as “every service the dependency provides”, and the difference is the difference between a gate that reports what it knows is skewed and one that reports what merely differs. If payment provides authorise and refund, orders calls only authorise, and refund’s contract changed, then recording refund in orders’s expects would refuse deploy --context orders over a service orders never touches and whose runtime check could never fire. ADR 0200 Decision E rejects a per-context hash for exactly this reason — that it becomes a deployment tax — and a per-context gate over per-service hashes would reintroduce it one layer up.

So the manifest’s expects mirrors the runtime check’s granularity: one entry per call site, discovered the same way the lowering discovers it — an ident chain on the receiver that resolves to a consumed context.