bynk.adapter.consumes_context
Error An adapter consumed a context; adapter dependencies are adapter-to-adapter.
Adapter dependencies run from adapter to adapter. An adapter sits at the host boundary and is wired in process beside its binding, but a context is a deployment unit with services of its own, so it cannot be consumed from there. Consume a capability that another adapter exports, or put the code that needs a context in a context.
Example
context logging { … }
// tokens.bynkadapter tokens { consumes logging { Log } // ✗ `logging` is a context}
// logging.bynkadapter logging { … } // ✓ an adapter, so it may be consumedIn the Book
See also
- The grammar rule it governs:
consumes_decl. - Every code in its category, Adapters, on the diagnostic index.
bynk explain bynk.adapter.consumes_contextshows the same from the installed toolchain, without a network.