src/ws/relock.bend fails
raw source on the hub · import ezx@1.11.0.0/src/ws/relock.bend as Relock
ws/relock: ez add and ez remove in a workspace (EZ-WS-10). Outside a
workspace each runs its command's plan joined to a plain lock over the
ledger it writes (add/relock.bend, remove/relock.bend, EZ-DOC-6). In a
workspace the lock that ledger belongs to is the root's, so the command's
own plan is joined instead to the plan a plain ez lock at the root makes
(U.plan, ws/up.bend) over the workspace the command leaves: the root's
ledger and every member's as git lists them, with the one the command
writes in place of its own, joined (ws/joint.bend), the .bend files git
lists under the root, and the lock's answers. The command runs where it
is, so every path that lock writes is taken from the root's directory
(at.effect), and no lock is written in a member.
A ledger the add or remove writes at the root is written through the
ledger model, which holds no [workspace] table, so it is written back with
the table it had (U.root.text), as an upgrade writes the root's.
16 imports
import Base import ../lock/plan.bend as LP import ../lock/world.bend as LW import ../lock/lock.bend as L import ../ledger/manifest.bend as M import ../ledger/render.bend as Rend import ../pkg/path.bend as P import ../relock/relock.bend as R import ../add/world.bend as A import ../add/plan.bend as AP import ../add/relock.bend as AR import ../remove/plan.bend as RP import ../remove/relock.bend as RR import ./workspace.bend as W import ./joint.bend as J import ./up.bend as U
The reader could not load this file (at 0x8d817ff76bee5f8a754f0b8cceb7d07a/src/ledger/manifest.bend:41). What bend.ts says:
Error:
- expected : a fresh name (duplicate declaration: Tool)
- observed : 'Tool'
Location:
40 | # not be the one.
41>| type Tool is Data:
| ^^^^
42 | Tool{name: String, entry: String, bin: String, source: Source}