Project 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; `Amount` is a type in `domains/billing/types/amount.jadpo` that only domain `billing` sees. next: Mark `Amount` `public`, or keep it out of `charge`'s signature (agent) rule: visibility.public_reaches_private help: https://jadpo.dev/docs/errors/visibility.public_reaches_privatecheck failed: 1 error, 4 files
Markdown for agents: /docs/errors/visibility.public_reaches_private.md.Built from Jadpo main at a707efb.