Plan.fetch.ask: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/fetch/plan.bend as Plan Lines 57-67 of ezx@1.11.0.0/src/fetch/plan.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/fetch/plan.bend&start_line=57&end_line=67 import Base import ezx@1.11.0.0/src/fetch/world.bend as F import ezx@1.11.0.0/src/lock/world.bend as W import ezx@1.11.0.0/src/lock/up.bend as Up import ezx@1.11.0.0/src/lock/lock.bend as L import ezx@1.11.0.0/src/pkg/path.bend as Path # the question that fetches a package from where the lock says it comes from: # a checkout of a git package at its rev, from its source as git is to read # it, a relative path taken from the project; or a hub package from the hub def fetch.ask(src: L.Src, +here: String, +hub: String, +hash: String) -> F.Ask: match src: case L.Hub{}: F.Hub{W.Pkg{hash, L.Hub{}, hub}} case L.Git{url, rev, _entry, _root, _nar, _tag}: F.Git{hash, Up.Clone{Path.anchor(here, url), rev}} case L.Member{_path, entry}: F.Tree{hash, entry} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/fetch/world.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/lock.bend&name=Src https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/up.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/world.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/path.bend&name=anchor