src/ws/doctor.bend checks
raw source on the hub · import ezx@1.16.0.0/src/ws/doctor.bend as Doctor
ws/doctor: ez doctor at a workspace root
(laws/WorkspaceDoctorPerMember.bend). The doctor runs at the root, as ez
lock does (ws/hop.bend), on a World whose ledger is the joint ledger
(ws/joint.bend), so the toolchain, the ledger, the lock, the library and
the lock check are judged over every member's ledger as the lock is made
from them. The drift report is each member's own: the hashes its import
lines name that its ledger does not, and the dependencies of its ledger no
import line of its own names, with each workspace = true section
resolved to the member's package as the joint ledger resolves it. A member
whose package walks to a hash the lock does not record for it is reported
too. Every report that is a problem fails the command (DP.plan.notes).
12 imports
import Base import ../doctor/plan.bend as DP import ../doctor/world.bend as DW import ../lock/plan.bend as P import ../lock/world.bend as LW import ../ledger/manifest.bend as M import ../ledger/render.bend as Rend import ../pkg/pkg.bend as K import ../pub/plan.bend as PP import ./workspace.bend as W import ./joint.bend as J import ./moved.bend as Mv
Types
type Back source · line 28 · raw
Data
what the doctor needs beyond its World: nothing, for a project of its own; or the root's ledger text, every other ez.toml git lists, and why the joint ledger could not be made, "" when it was
AloneBack
Back@text:String -> @found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @why:String -> Back
type Doctored source · line 33 · raw
Data
the ledger the doctor judges, and what else it needs
Doctored@ledger:Maybe<&2, String> -> @back:Back -> Doctored
Definitions
def joint source · line 39 · raw
@jj:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Joint -> @+text:String -> @+fs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> Doctored
what the doctor judges at a workspace root: the joint ledger, the same text
ez lock plans the root lock from, or, when it cannot be made, the root's
own ledger with why
def under source · line 52 · raw
@+dir:String -> @+at:String -> Bool
whether a path is under a directory of the root
def under.any source · line 56 · raw
@dirs:List<&2, List<&2, String>> -> @+at:String -> Bool
whether a path is under any member's directory
def own.at source · line 66 · raw
@dir:List<&2, String> -> @+dirs:List<&2, List<&2, String>> -> @+at:String -> Bool
whether a committed file is a member's own: under its directory, or, for the root, under no member's
def own.put source · line 74 · raw
@hit:Bool -> @src:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source -> @rest:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source>
a file kept, when it is the member's own
def own.files source · line 82 · raw
@+dir:List<&2, String> -> @+dirs:List<&2, List<&2, String>> -> @fs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source>
the committed files that are a member's own
def dirs.of source · line 98 · raw
@xs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Member> -> List<&2, List<&2, String>>
every member's directory
def nv.of source · line 106 · raw
@named:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/pub/plan.Named -> List<&2, String>
the name a member is imported by, when it publishes under one
def nvs.of source · line 118 · raw
@xs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Member> -> List<&2, String>
every name a member is imported by. Such a name is resolved in the workspace whether or not a section names it (laws/PublishedMemberImportedByName.bend), so no member's ledger has to.
def drift source · line 128 · raw
@+hs:List<&2, String> -> @+ds:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ledger/manifest.Dep> -> @+nvs:List<&2, String> -> List<&2, String>
both directions of a member's disagreement: a hash its own import lines name that its own ledger does not, and a dependency of its ledger none of them names
def at.lines source · line 133 · raw
@+place:String -> @ls:List<&2, String> -> List<&2, String>
a member's line, said for the member
def drift.notes source · line 141 · raw
@+place:String -> @+hs:List<&2, String> -> @lines:List<&2, String> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
a member's report, or the one line that says there is nothing to report
def member.drift source · line 150 · raw
@mb:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Member -> @+dirs:List<&2, List<&2, String>> -> @+nvs:List<&2, String> -> @+fs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
one member's drift report, over its own files
def moved.line source · line 164 · raw
@+root:String -> @+now:String -> @+held:String -> String
how a moved member reads
def moved.at source · line 170 · raw
@found:Maybe<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/moved.Held> -> @+root:String -> @+now:String -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
a member's walk against what the lock records at its directory, once that is looked up
def moved.walked source · line 179 · raw
@got:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/pkg/pkg.Walked -> @+locked:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/moved.Held> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
a member's walk against the lock
def member.moved source · line 191 · raw
@mb:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Member -> @+files:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/pkg/pkg.Source> -> @+locked:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/moved.Held> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
one member against the lock: its package walked from its entry over the committed files, reported when the lock records another hash at its directory
def members.notes source · line 197 · raw
@xs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Member> -> @+dirs:List<&2, List<&2, String>> -> @+nvs:List<&2, String> -> @+fs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source> -> @+locked:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/moved.Held> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
every member's report: its drift, then whether it moved
def resolved.notes source · line 213 · raw
@rd:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Read -> @+fs:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Source> -> @+locked:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/moved.Held> -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
the members' reports, once they were resolved
def listing.notes source · line 221 · raw
@listing:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/world.Listing -> @+text:String -> @+found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @+lock:String -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
the members' reports over the sources as git listed them
def sources.notes source · line 234 · raw
@got:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.Heard -> @+text:String -> @+found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @+lock:String -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
the members' reports, once the sources were asked for
def tail.pick source · line 251 · raw
@fine:Bool -> @+why:String -> @+text:String -> @+found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
what the doctor says after the toolchain, the ledger, the lock, the library and the lock check: why the joint ledger could not be made, or else every member's report
def tail source · line 265 · raw
@+why:String -> @+text:String -> @+found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
and so, once it is known whether the joint ledger was made
def notes source · line 269 · raw
@+why:String -> @+text:String -> @+found:List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/ws/joint.Found> -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> List<&2, 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Note>
every line the doctor says at a workspace root
def plan source · line 278 · raw
@back:Back -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/lock/plan.Plan
ez doctor: for a project of its own, the doctor's plan; at a workspace
root, the same lines over the joint ledger, with each member's report in
place of the one drift report
def step.of source · line 286 · raw
@st:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Step -> @back:Back -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Step
the step, once the doctor's own is known: its questions, or this plan
def step source · line 295 · raw
@back:Back -> @+world:0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/world.World -> 0x71927e9fe3c5d91fa7a64d2340a0fdac/src/doctor/plan.Step
what the interpreter does next: the doctor asks what it always asks, the sources among them, and its plan is this one