def part.fetch
ezx@1.11.0.0 · src/fetch/plan.bend:335
import ezx@1.11.0.0/src/fetch/plan.bend as Plan
import Base
import ezx@1.11.0.0/src/fetch/world.bend as F
import ezx@1.11.0.0/src/lock/lock.bend as L
import ezx@1.11.0.0/src/pkg/pkg.bend as K
335
336def part.fetch(
337 +rs: List<&2, F.Reply>,
338 +src: L.Src,
339 fs: List<&2, K.Item>,
340 +here: String,
341 +hub: String,
342 +hash: String
343) -> Part:
344 match src:
345 case L.Member{+path, +entry}:
346 part.member(F.heard(rs, F.Tree{hash, entry}), fs, path, entry, hash)
347 case L.Hub{}:
348 part.fetch.heard(F.heard(rs, fetch.ask(L.Hub{}, here, hub, hash)), fs, L.src.root(L.Hub{}))
349 case L.Git{url, rev, entry, root, nar, tag}:
350 part.fetch.heard(F.heard(rs, fetch.ask(L.Git{url, rev, entry, root, nar, tag}, here, hub, hash)), fs,
351 L.src.root(L.Git{url, rev, entry, root, nar, tag}))