src/pub/world.bend checks
raw source on the hub · import 0x886223f5c47e4983fe57d887c034bc7f/src/pub/world.bend as World
pub/world: what ez publish reads. The directory the project is in
(here), which git is asked about; the ledger's text, None when there is no
ez.toml; and the answers to the questions the planner (pub/plan.bend)
asked. There is no field for BEND_LIB, the hub or the clock, because the
planner reads none of them.
A question is one of the tool commands' own (tool/world.bend): Locate for
what git says of the project, git status --porcelain
--untracked-files=normal among it, and Read for a file the package walk
asks for. Two are publish's: Tracked, every file git tracks under the
project with its git ls-files -v tag, and Upload, bend <entry>
--publish, with the <name>@<version> the ledger names the package by
after it when it names one, run and what it printed. The upload carries the
line said just before it runs: the description the hub will show. The upload is the one
question whose answering is not a read: it sends the package, so the planner
asks it last, once every check that can be made before it has passed.
2 imports
import Base import ../tool/world.bend as TW
Types
type Ask source · line 21 · raw
Data
a question the planner asks
Tool@ask:0x886223f5c47e4983fe57d887c034bc7f/src/tool/world.Ask -> Ask
TrackedAsk
Upload@entry:String -> @named:String -> @says:String -> Ask
LockAsk
Hub@url:String -> Ask
type Answer source · line 30 · raw
Data
the answer to one: the tool commands' answer, or whether a program exited 0 and what it printed
Told@answer:0x886223f5c47e4983fe57d887c034bc7f/src/tool/world.Answer -> Answer
Ran@ok:Bool -> @text:String -> Answer
type Reply source · line 35 · raw
Data
one question, answered
Reply@ask:Ask -> @answer:Answer -> Reply
type World source · line 39 · raw
Data
everything ez publish reads
World@here:String -> @ledger:Maybe<&2, String> -> @replies:List<&2, Reply> -> World
type Heard source · line 83 · raw
Data
an answer looked up, or none yet
Heard@answer:Answer -> Heard
OpenHeard
Definitions
def toml source · line 43 · raw
String
the ledger's path, which is fixed
def lockfile source · line 47 · raw
String
the lock's path, which is fixed
def here source · line 51 · raw
@world:World -> String
the directory the project is in
def ledger source · line 56 · raw
@world:World -> Maybe<&2, String>
the ledger's text, None when there is no ez.toml
def replies source · line 61 · raw
@world:World -> List<&2, Reply>
every question answered so far
def key source · line 69 · raw
@ask:Ask -> String
the key a question is looked up by. A command uploads once, so the upload's key does not name the entry: the planner looks its answer up without knowing which entry the ledger names, and a law about that answer holds whatever the ledger says.
def look.step source · line 89 · raw
@hit:Bool -> @answer:Answer -> @rest:(@_:Unit -> Heard) -> Heard
this answer when it is the question's, otherwise the rest's. The rest arrives as a thunk, so the first hit ends the scan.
def look source · line 97 · raw
@rs:List<&2, Reply> -> @+want:String -> Heard
the first answer given to a question
def heard source · line 105 · raw
@+world:World -> @ask:Ask -> Heard
the answer to a question, or none yet