When something goes wrong
Each message, as Barntree prints it.
Barntree says what is wrong and, where it can, where. Each message below was produced by the command beside it.
| What it says | When | What to do |
|---|---|---|
No barn found. Run barntree init to make one. | template:list outside a barn | Run barntree init in the project’s root, or work inside a folder that has .barn/. |
No tree called 'Nothing' is kept in '…/allotment/.barn/barntree/trees'. | template:show with a name no Template has | Run template:list for the names. A name that holds a mistake is the usual cause. |
Supply --from-file=<JSON file> or --from-file=-. | template:create with no file | Give it a JSON file, or - for standard input. |
No saved construction revision was found for '<id>'. | construction:show with an id Barntree doesn’t have | Use the id that construction:list prints. |
Unknown item ID: <id> | member:add with an item that no longer exists | Read the Construction again: removing a member removes its id. |
List item '<id>' has two members named 'Beans'. | member:add with a name the list already holds | Choose another name. |
The item at 'Compost' follows 'Compost', a leaf, so it can't hold members: only a list item can. | member:add on an item that is not a list | Use the id of a list item. |
Construction revision conflict. | member:add with a stale --expect-revision | Read the Construction, and decide again. Nothing was overwritten. |
Removal needs confirmation. Use --yes to confirm. | member:remove with no --yes, not at a prompt | Add --yes once you know what goes. |
Delete Template: Allotment | template:delete or a structural change with no --yes | Add --yes. |
This building block is still used. | type:delete on a type something holds | Remove the connections that use it first. |
Page exceeds the available history. | a history page past the last | Use a lower --page. |
Will not write over "garden-folders": it already exists | export --to a path that exists | Choose a path that doesn’t exist yet, or an empty folder for folders. |
Cannot export as "pdf". Choose one of: text, markdown, folder, mermaid | export --as with an unknown kind | The message lists the kinds there are. |
These names cannot be folders: "Allotment/Beds/Why?": it has one of / \ : * ? " < > | | export --as=folder with an item name that can’t be a folder | Rename the items it names. Every one is reported at once. |
A Template is broken #
The check says which, and why:
$ vendor/bin/barntree check
Barn: …/allotment
Checking the trees in …/allotment/.barn/barntree/trees
Allotment: valid
Pond: broken: Type 'Pond' is of 'Fish', which is not one of the tree's types.
Open the file and fix what it names, or restore it from version control. A file that doesn’t name a Template, or names one another file
already holds, stops the check before any Template is read, as fault: <file>: <reason>. One bad file refuses its whole folder, because a
Template left out without a word would be worse.
A file I changed by hand doesn’t match its history #
A file edited outside Barntree can differ from its last recorded revision, and a read says so. Open it in the app, or save it through a command, and the save records what was there first.
Known limits #
- A document that breaks a rule reports one rule at a time. Only a document that doesn’t fit the shape reports every fault at once.
- Members’ names are matched exactly as typed, so Kitchen and kitchen can sit in one list.
- The store reads its folder once, when it is first asked. A file added after that is not seen until a new store is made.
- A Construction can’t be exported, restored to an earlier revision, or moved to a newer Template yet.
- Tags are written in the file and not edited in the app or on the command line.