bynk.consumes.signature_type_unconsumed
Error A cross-context call reaches a service whose signature names a type the consumed context itself consumes from a third context, which the caller does not consume.
A service you call may take or return a type declared in a third context. The value crosses the call as that context's type, so your context has to state the dependency itself: it does not inherit it from the service's context. Add consumes for the context the error names.
Example
consumes shop.order
service domestic { on call(id: String) -> Effect[Order] by Caller { … }}
// shop/front.bynkconsumes shop.ledger
let o <- shop.ledger.domestic(id) // ✗ returns `Order`, from `shop.order`
consumes shop.ledgerconsumes shop.order // ✓ the dependency is statedIn the Book
See also
- The grammar rule it governs:
consumes_decl. - Every code in its category, Consumes, on the diagnostic index.
bynk explain bynk.consumes.signature_type_unconsumedshows the same from the installed toolchain, without a network.