Project layout and modules · rule
visibility.private_cross_domain
Another domain uses a private declaration.
Area 1, Project layout and modules; not declinable; the next step is usually the human's.
use shared/types { Quantity }action reserve_stock(quantity: Quantity) -> Unit {}
use shared/types { Quantity }use inventoryaction checkout(quantity: Quantity) -> Unit { inventory.reserve_stock(quantity)}
error: `reserve_stock` is private to domain `inventory` --> domains/ordering/actions/checkout.jadpo:5:15 |5 | inventory.reserve_stock(quantity) | ^^^^^^^^^^^^^ private reason: Another domain may use only what a domain marks `public`; `reserve_stock` is an action in `domains/inventory/actions/reserve_stock.jadpo`. next: Mark `reserve_stock` `public` if `inventory` should offer it to other domains (human) rule: visibility.private_cross_domain help: https://jadpo.dev/docs/errors/visibility.private_cross_domaincheck failed: 1 error, 4 files
A fixture is private to its domain too: another domain's tests call it only
when it is public (area 13):
use planningtest "reminders start from planning's open todos" { send_reminders() assert planning.two_open_todos() == 2}
error: `two_open_todos` is private to domain `planning` --> domains/reminders/actions/send_reminders.test.jadpo:5:21 |5 | assert planning.two_open_todos() == 2 | ^^^^^^^^^^^^^^ private reason: Another domain may use only what a domain marks `public`; `two_open_todos` is a fixture in `domains/planning/fixtures/two_open_todos.jadpo`. next: Mark `two_open_todos` `public` if `planning` should offer it to other domains' tests (human) rule: visibility.private_cross_domain help: https://jadpo.dev/docs/errors/visibility.private_cross_domaincheck failed: 1 error, 5 files
Markdown for agents: /docs/errors/visibility.private_cross_domain.md.Built from Jadpo main at a707efb.