Lockfiles
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
graphGenLockfilesGoal()
graphGenLockfilesGoal(roots)
Check each selected [GEN_LOCKFILES] root, then log the toolchains it locked.
GEN_LOCKFILES
const GEN_LOCKFILES
Undocumented.
registerBuiltinLockfile()
registerBuiltinLockfile(spec)
Register the shipped (checked-in, embedded) lockfile for a toolchain. Called once at module load by each toolchain rule module; consumed by the gen-builtin-lockfiles goal. versions is authoritative — regeneration writes exactly these versions, so bumping, downgrading support, and pruning are all edits to this list. handle, plus versions: string[]; lockfile is required.
| Parameter | Type | Description |
|---|---|---|
| spec | object | Same shape as generateToolLockfile's opts minus |
builtinLockfiles()
builtinLockfiles()
Registered builtin lockfile specs, in registration order.
registerToolchainLockfile()
registerToolchainLockfile(spec, versions)
Register a toolchain's builtin (checked-in) lockfile. Return the spec for the caller's own toolchain[GEN_LOCKFILES] = graphGenerateToolLockfile({ version, ...spec }) assignment. Without this helper, every toolchain module would repeat the registerBuiltinLockfile({ ...spec, versions }) line. This function does not build the [GEN_LOCKFILES] root itself. Each toolchain's own module must still do that call, next to its declaration function. handle.
| Parameter | Type | Description |
|---|---|---|
| spec | object | Same shape as generateToolLockfile's opts minus |
| versions | string[] | Versions the shipped lockfile should pin. |
Returns: object spec, for the caller's own graphGenerateToolLockfile call.