ErrorsProject layout and modules · rule
visibility.public_reaches_private
Public declaration's signature names one that isn't public.
Area 1, Project layout and modules; not declinable; the next step is usually the agent's.
Everything a public declaration's signature names is public too (area 11),
since whoever uses it
has to build or handle it: a public action's parameters, result and failures,
a public type's fields, a public library's functions' signatures. A type in
shared/ or the standard library is everyone's already:
use billing/types { Amount }public action charge(amount: Amount) -> Unit {}
error charge is public, but Amount isn't
--> domains/billing/actions/charge.jadpo:3:30
|3 | public action charge(amount: Amount) -> Unit {} | ^^^^^^ a type only domain `billing` sees
- reason
- Whoever uses a public action has to build or handle what its signature names, so everything it names is public too;
Amountis a type indomains/billing/types/amount.jadpothat only domainbillingsees. - next
- Mark
Amountpublic, or keep it out ofcharge's signature (agent) - rule
- visibility.
public_ reaches_ private - help
- https://jadpo.
dev/docs/errors/visibility. public_ reaches_ private
Markdown for agents: /docs/errors/visibility.public_reaches_private.md.Built from Jadpo main at aee2e8f.