~/bend-docscommunity

src/ez/key.bend checks

raw source on the hub · import 0x886223f5c47e4983fe57d887c034bc7f/src/ez/key.bend as Key

ez/key: what a cached tool checkout and binary were made from. A checkout is its commit. A binary is not: a pin's bin or entry builds another file from the same commit, and another bend builds the same file differently. So the binary's record is all three, and it is reused only when every one of them is the one about to be built.

1 import
import Base

Types

type Stamp source · line 9 · raw

Data

the commit, the file handed to bend, and the bend that built it

Definitions

def none source · line 13 · raw

Stamp

the record that matches nothing: an empty commit is never reused

def show source · line 17 · raw

@key:Stamp -> String

the record as it is written, one field to a line

def read.third source · line 24 · raw

@+rev:String -> @+file:String -> @ls:List<&2, String> -> Stamp

exactly three lines, or no record. A cache written before the file and the bend were recorded holds the commit alone, and that reads as no record.

def read.second source · line 35 · raw

@+rev:String -> @ls:List<&2, String> -> Stamp

def read.lines source · line 42 · raw

@ls:List<&2, String> -> Stamp

def read source · line 50 · raw

@+text:String -> Stamp

a record's text, as show wrote it and a file read trimmed it

def checkout source · line 55 · raw

@+was:String -> @+now:String -> Bool

the checkout is this commit, and there is a commit at all. The checkout's record is the commit alone: the file and the bend are the binary's business.

def reuse source · line 60 · raw

@was:Stamp -> @now:Stamp -> Bool

the three fields the same, and a commit at all. An empty commit is a dirty tree or a directory that is not a checkout, and those are built every time.