def tool.fill

ezx@1.11.0.0 · src/lock/up.bend:1040

import ezx@1.11.0.0/src/lock/up.bend as Up
import Base
import ezx@1.11.0.0/src/ledger/manifest.bend as M
import ezx@1.11.0.0/src/ledger/upgrade.bend as U

1040# a pin with no commit is resolved from its tag, or the default ref, then
1041# weighed. One with a commit and no NAR hash is upgraded as a full pin is,
1042# and its NAR hash is written in wherever it lands: filled at its own commit
1043# only, it would move on the next upgrade, which follows its tag or the
1044# default branch.
1045def tool.fill(no_rev: Bool, +rs: List<&2, Reply>, +tool: M.Tool) -> Pinned:
1046  match no_rev:
1047    case True{}:
1048      +src = M.tool.source(tool)
1049      +url = M.source.url(src)
1050      tool.named(tool.ref(String.is_empty(M.source.tag(src)), rs, url,
1051        M.source.tag(src)), rs, tool, url)
1052    case False{}:
1053      tool.aim(U.aim(True{}, M.tool.source(tool)), rs, tool)

Uses (13)

Used by (1)