def ref.place

ezx@1.11.0.0 · src/ws/pin.bend:42

import ezx@1.11.0.0/src/ws/pin.bend as Pin
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/pkg/path.bend as P
import ezx@1.11.0.0/src/ez/target.bend as Tgt
import ezx@1.11.0.0/src/add/world.bend as A
import ezx@1.11.0.0/src/ws/joint.bend as J

42# a place's ref: a git source's against the workspace's pins, as the root
43# reads the source from the member's directory, and anything else as given
44def ref.place(place: Tgt.Place, +pins: List<&2, M.Dep>, +dir: String, +home: String, +ref: String) -> Ref:
45  match place:
46    case Tgt.Bad{_why}:
47      Given{ref}
48    case _:
49      +url = P.anchor(dir, A.url.of(place, home))
50      ref.at(J.pin.of(pins, url), url, ref)

Uses (9)

Used by (1)