Stubs

Reference

stubs.lock

stubs deps update writes stubs.lock beside stubs.yaml: the exact commit of every module the workspace depends on, directly or through other modules. Commit it with your workspace, so everyone builds against the same versions. Pushing a module sends its pins along.

version: 1
deps:
  - name: stubs.dev/acme/common
    commit: 6f5a0e8d9c1b4a2e8f3d7c6b5a4e3d2c
    digest: b5:3c8e…

stubs writes it, and nobody edits it: change deps in stubs.yaml and run stubs deps update again. stubs reads it strictly, as it does stubs.yaml.

version

The format: 1.

deps

One entry per module:

KeyWhat it is
nameThe module's name.
commitThe commit it's pinned to.
digestThe commit's content digest (b5: and 128 hex digits), checked on every download, so a module's files can't change under you.

policies

The registry policies stubs.yaml names, each with the commit its rules are pinned at:

KeyWhat it is
nameThe policy's name.
commitThe commit whose rules stubs lint and stubs breaking check with.
digestThe rules' digest (o1: and 128 hex digits), checked when they're downloaded and each time they're used, so a policy's rules can't change under you.

stubs build, lint, breaking, generate and push use the pinned commits, downloading each once into stubs's cache and checking it against its digest. stubs.lock may pin only the modules stubs.yaml's deps lead to, directly or not, and a file two of them provide is refused rather than one of them winning: run stubs deps update after changing deps.