src/ws/pin.bend checks
raw source on the hub · import ezx@1.18.0.0/src/ws/pin.bend as Pin
ws/pin: the ref ez add in a workspace member takes
(laws/WorkspaceOnePinPerSource.bend). A git source has one pin across a
workspace, so a member adding a source another member already records
takes that pin: with no ref, the tag it records, or its commit when it
records none; with the tag or commit it records, that; with any other ref,
nothing, since moving the source is an upgrade of every member that
records it. A source no member records, and a hub package, take the ref as
it was given.
6 imports
import Base import ../ledger/manifest.bend as M import ../pkg/path.bend as P import ../ez/target.bend as Tgt import ../add/world.bend as A import ./joint.bend as J
Types
type Ref source · line 17 · raw
Data
the ref an add goes on with, or why it stops
Given@ref:String -> Ref
Held@why:String -> Ref
Definitions
def held source · line 23 · raw
@+rev:String -> @+tag:String -> String
the ref the workspace pins a source at: its tag, or its commit when it has no tag
def ref.pinned source · line 27 · raw
@+url:String -> @+rev:String -> @+tag:String -> @+ref:String -> Ref
a ref given against the pin the workspace records for the source
def ref.at source · line 34 · raw
@src:0x2414c9622cab2353684d02a392804eb1/src/ledger/manifest.Source -> @+url:String -> @+ref:String -> Ref
a ref given against what the workspace records for the source, if anything
def ref.place source · line 45 · raw
@place:0x2414c9622cab2353684d02a392804eb1/src/ez/target.Place -> @+pins:List<&2, 0x2414c9622cab2353684d02a392804eb1/src/ledger/manifest.Dep> -> @+dir:String -> @+home:String -> @+ref:String -> Ref
a place's ref: a git source's against the workspace's pins, as the root reads the source from the member's directory, and anything else as given
def ref source · line 56 · raw
@+pins:List<&2, 0x2414c9622cab2353684d02a392804eb1/src/ledger/manifest.Dep> -> @+dir:String -> @+home:String -> @+target:String -> @+ref:String -> Ref
the ref ez add <target> [ref] in a member goes on with: pins is every
dependency of the workspace's joint ledger and dir the member's directory
from the root. A hub package, added by its <name>@<version>, has no ref.