~/bend-docscommunity

src/share/pin.bend checks

raw source on the hub · import 0x886223f5c47e4983fe57d887c034bc7f/src/share/pin.bend as Pin

share/pin: a plain ez lock refuses a [tools.*] pin it would have to fill. It copies every pin as the ledger has it and never asks a remote, so a pin with no commit or no NAR hash stops it, naming the upgrade that fills the pin. Filling and moving a pin is ez lock --upgrade's, in lock/up.bend.

2 imports
import Base
import ../ledger/manifest.bend as M

Definitions

def gap.git source · line 12 · raw

@no_rev:Bool -> @no_nar:Bool -> @+name:String -> String

why a plain lock cannot copy a git pin as it stands, or "" when it can. The lock copies rev and narHash out of the ledger and never asks a remote for them, so a pin missing either is refused rather than filled, and the upgrade that fills it is named.

def gap source · line 27 · raw

@pin:0x886223f5c47e4983fe57d887c034bc7f/src/ledger/manifest.Tool -> String

why a plain lock cannot copy a pin as it stands, or "" when it can. A pin with no repo has nothing to pin, under a plain lock or an upgrade.

def gaps.step source · line 38 · raw

@none:Bool -> @here:String -> @rest:(@_:Unit -> String) -> String

this pin's gap when it has one, otherwise the rest's. The rest arrives as a thunk and only the arm that wants it applies it, so the first gap stops the scan.

def gaps source · line 47 · raw

@ts:List<&2, 0x886223f5c47e4983fe57d887c034bc7f/src/ledger/manifest.Tool> -> String

the first pin, in ledger order, a plain lock cannot copy, or "" when it can copy every one