src/fetch/world.bend checks
raw source on the hub · import 0x74799d3f846634a3d7461d4336d7c9d4/src/fetch/world.bend as World
fetch/world: what ez fetch reads. The directory the project is in
(here), which a relative path in the lock is anchored to; whether there is
an ez.toml, since fetch fills BEND_LIB for a project and nothing else; the
lock's text, None when there is no ez.lock.toml; and the answers to the
questions the planner (fetch/plan.bend) asked. There is no field for
BEND_LIB's path, the environment or the clock, because the planner reads
none of them.
A question is about one package of the lock, by its hash: the tree already
under BEND_LIB (Laid), or the package fetched from where the lock says it
comes from. A git package is the upgrade's own Clone question
(lock/up.bend), a shallow checkout at the pinned rev with every file's
text; a hub package is the lock's own question (lock/world.bend), the
hub's manifest and every file it names. Laid and a hub package are
answered the way the lock answers its questions, with a manifest and the
texts of the files it names, and a clone the way the upgrade answers
Clone.
A name the lock records is asked about too: the file bend reads its hash
from, $BEND_LIB/names/<nv> (Named), as it is, or that there is none.
5 imports
import Base import ../toml/toml.bend as T import ../lock/lock.bend as L import ../lock/world.bend as W import ../lock/up.bend as Up
Types
type Ask source · line 28 · raw
Data
a question about one package of the lock, or one name it records
Laid@hash:String -> Ask
Git@hash:String -> @ask:0x74799d3f846634a3d7461d4336d7c9d4/src/lock/up.Ask -> Ask
Hub@ask:0x74799d3f846634a3d7461d4336d7c9d4/src/lock/world.Ask -> Ask
Named@nv:String -> Ask
type Answer source · line 37 · raw
Data
the answer to one question: a manifest and the texts of the files it names, what a clone answered, or a names file's text, None when there is none
Read@answer:0x74799d3f846634a3d7461d4336d7c9d4/src/lock/world.Answer -> Answer
Said@answer:0x74799d3f846634a3d7461d4336d7c9d4/src/lock/up.Answer -> Answer
Held@got:Maybe<&2, String> -> Answer
type Reply source · line 43 · raw
Data
one question, answered
Reply@ask:Ask -> @answer:Answer -> Reply
type World source · line 47 · raw
Data
everything ez fetch reads
World@here:String -> @ledger:Bool -> @lock:Maybe<&2, String> -> @replies:List<&2, Reply> -> World
type Heard source · line 115 · raw
Data
an answer looked up, or none yet
Heard@answer:Answer -> Heard
OpenHeard
Definitions
def toml source · line 51 · raw
String
the ledger's path, which is fixed
def lockfile source · line 55 · raw
String
the lock's path, which is fixed
def here source · line 60 · raw
@world:World -> String
the directory the project is in, which every relative path in the lock is read against
def ledger source · line 65 · raw
@world:World -> Bool
whether there is an ez.toml
def lock source · line 70 · raw
@world:World -> Maybe<&2, String>
the lock's text, None when there is no ez.lock.toml
def replies source · line 75 · raw
@world:World -> List<&2, Reply>
every question answered so far
def sects.of source · line 80 · raw
@got:Maybe<&2, String> -> List<&2, 0x74799d3f846634a3d7461d4336d7c9d4/src/toml/toml.Sect>
a lock's text, as tables; none when there is no lock
def sects source · line 88 · raw
@world:World -> List<&2, 0x74799d3f846634a3d7461d4336d7c9d4/src/toml/toml.Sect>
the lock, as tables
def hub.key source · line 92 · raw
@ask:0x74799d3f846634a3d7461d4336d7c9d4/src/lock/world.Ask -> String
a hub question as a key
def key source · line 103 · raw
@ask:Ask -> String
a question as a key. A lock's value never holds a newline, so the fields are kept apart by one.
def look.step source · line 121 · 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 129 · raw
@rs:List<&2, Reply> -> @+want:String -> Heard
the first answer given to a question
def heard source · line 137 · raw
@rs:List<&2, Reply> -> @ask:Ask -> Heard
the answer to a question, or none yet