Skip to content
Playground(another site)

bynk.package.unit_not_exported

Error A uses or consumes reaches a unit its dependency declares but doesn't list in [package] exports.

A package lists in exports the units it offers to its users, and keeps the rest free to change, as a library keeps its internals. A unit that exists but is not listed is refused, so a consumer cannot come to rely on it. Use one of the exported units, or ask the package to export it. Leaving exports out shares every commons and adapter. A name the package does not declare at all is bynk.package.unknown_unit.

Example

exports = ["notify"] // in the package's `bynk.toml`
uses lib.internal // ✗ not in `exports`
uses lib.notify // ✓ an exported unit

In the Book

See also

  • Every code in its category, Packages, on the diagnostic index.
  • bynk explain bynk.package.unit_not_exported shows the same from the installed toolchain, without a network.