cli.rename_arguments
A jadpo rename command names a declaration or field the project doesn't have, one it doesn't rename, or a new name that is taken or isn't one.
Area 14, Tools; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
jadpo rename gives one declaration or field a new name everywhere code names it, and keeps what is stored under the old one. A name means one thing in a project, so a new name already in use would make two things of one, and the rename stops before it changes anything.
What it looks like
A new project, whose Visitor type is renamed to Greeting, the name its other type already has:
jadpo new todo > /dev/nullcd todojadpo rename Visitor Greeting
error Greeting is already declared
- reason
Greetingis the type indomains/hello/types/greeting.jadpo, and a private name is unique withinhello, soVisitorcan't take it.- next
- Choose another name, then run
jadpo rename Visitor <new-name>(agent) - in use
Greeting domains/hello/types/greeting.jadpo
- rule
- cli.
rename_ arguments - help
- https://jadpo.
dev/docs/errors/cli. rename_ arguments
(agent) at the end of the next: line means your coding agent can make the fix itself.
How to fix it
If the name is taken, choose one the in use list doesn't hold:
jadpo rename Visitor GuestThe list shows the names in use that share the new name's words, so a name that differs from them all can't clash.
If the name isn't one for its kind, write a type's or an entity's in UpperCamelCase and everything else's in lower_snake_case:
jadpo rename greet welcomeThe action, its file and every call take the new name.
If it names a field, name the field after its entity or type, and give it a name of its own:
jadpo rename Todo.priority importanceThe field takes its new name everywhere, and its column and rows stay where they are.
If it names a copied field, one a type brings in with pick: or include:, rename the field it copies, which the refusal names:
jadpo rename CakeLine.cake dishEvery copy takes the new name with it.
If it names a package's declaration, rename one of your app's own instead, such as the function that calls it:
jadpo rename read_postcode check_postcodeA rename never edits a package: an installed one is read-only, and its names are the ones it publishes.
Related
Markdown for agents: /docs/errors/cli.rename_arguments.md.Built from Jadpo's main branch at commit 9080dc3.