Skip to content
Playground(another site)

bynk.package.alias_shadows_unit

Error A dependency alias in [dependencies] is also the first segment of one of the project's own units, so <alias>.… would be ambiguous.

The key of a [dependencies] entry is the alias a unit reaches the package by, as in lib.notify. If one of the project's own units also starts with that word, shop.cart for an alias shop, then shop.… could mean the package or the unit, and the compiler will not choose. Rename the alias, which is the key, or rename the unit.

Example

[dependencies]
shop = { package = "acme/lib", path = "pkg/lib" } // ✗ the project has a unit `shop`
lib = { package = "acme/lib", path = "pkg/lib" } // ✓ an alias no unit starts with

In the Book

See also

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