Skip to content
Playground(another site)

bynk.adapter.consumes_requires_selection

Error An adapter used a whole-unit or aliased consumes; adapters must select capabilities with consumes U { Cap, … }.

An adapter depends on another adapter's capabilities, never on its services, so its consumes must say which: consumes logging { Log }. The whole-unit form and as Alias belong to contexts. Braces that select only types are refused too, since they name no capability. List the capabilities the adapter needs.

Example

adapter tokens {
consumes logging // ✗ which capabilities?
}
adapter tokens {
consumes logging { Log } // ✓ the capabilities it needs
}

In 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_requires_selection shows the same from the installed toolchain, without a network.