ErrorsExternal services · rule
package.name_taken
A package has the same name as one of the app's domains, libraries, declarations or other packages.
Area 11, External services; not declinable; the next step is usually the human's.
Why Jadpo refuses it
A package's name is how code reaches it, as in Couriers.Parcel, and
it shares one set of names with the app's domains and libraries. If two
of them had the same name, a reader couldn't tell which one Couriers
means. So each name means one thing.
Jadpo won't choose which of the two to rename. A name is how people find the code, so the choice is yours.
What it looks like
The app has a domain called couriers, with an action in
domains/couriers/actions/book.jadpo. Its own integration for a courier's
API is called Couriers too.
shared/providers/couriers/v1/package.jadpo:
/// A courier's booking API.package Couriers.v1 { licence: Licence.mit jadpo: "1.0"}
error Package Couriers's name is already taken
--> shared/providers/couriers/v1/package.jadpo
- reason
- A package's name joins the names of the app's domains and libraries, which are unique among themselves, and two packages never share a name in code, so
Couriers.means one thing; it is already domaincouriers. - next
- Rename one of them (human)
- rule
- package.
name_ taken - help
- https://jadpo.
dev/docs/errors/package. name_ taken
(human) at the end of the next: line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides what the package and the domain are called.
How to fix it
The question is which of the two keeps the name.
If the domain keeps it, rename the package after its provider, in a
folder of the same name, shared/providers/acme_couriers/v1/:
/// A courier's booking API.package AcmeCouriers.v1 { licence: Licence.mit jadpo: "1.0"}
Code reaches the package as AcmeCouriers, and couriers stays the
domain. Each use shared/providers/couriers line becomes
use shared/providers/acme_couriers.
If the package keeps it, rename the domain by moving its folder, here
to domains/deliveries/:
action book() -> Unit {}The domain is now deliveries, and Couriers means only the package.
Every use line and call that named the domain changes with it.
Related
Markdown for agents: /docs/errors/package.name_taken.md.Built from Jadpo main at aee2e8f.