def effects.of
ezx@1.11.0.0 · src/add/hub.bend:300
import ezx@1.11.0.0/src/add/hub.bend as Hub
import Base
import ezx@1.11.0.0/src/add/world.bend as A
import ezx@1.11.0.0/src/lock/plan.bend as P
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ledger/render.bend as Rend
import ezx@1.11.0.0/src/ledger/ignore.bend as I
300
301
302
303def effects.of(
304 +dep: M.Dep,
305 +hash: String,
306 +ls: List<&2, W.Source>,
307 +manifest: M.Manifest,
308 +world: A.World
309) -> List<&2, P.Effect>:
310 +old = M.find(A.deps.of(manifest), M.dep.name(dep))
311 +next = I.sync(A.deps.of(Rend.add.keep(manifest, dep)), A.ignore(world))
312 P.Lay{place.of(M.source.vendor(M.source.dep(old))), hash,
313 List.append(&2, W.Source, ls, [W.Source{"manifest", W.manifest(ls)}])} <>
314 (P.Name{nv(world), hash} <>
315 (P.Write{A.toml(), Rend.show(Rend.add.keep(manifest, dep))} <>
316 ignore.put(String.eq(next, A.ignore(world)), next,
317 says(hash, M.dep.entry(dep), world))))