Stubs

Reference

stubs.lock and buf.lock

stubs dep update writes stubs.lock next to 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.

# Generated by stubs. DO NOT EDIT.
version: v2
deps:
  - name: stubs.dev/acme/common
    commit: 6f5a0e8d9c1b4a2e8f3d7c6b5a4e3d2c
    digest: b5:3c8e…

stubs.lock has the same format as buf.lock, so the two can be compared, but stubs never reads buf.lock: when a project switches to stubs, the first stubs dep update resolves its dependencies afresh (see Already using buf?). Don't edit it by hand; change deps in stubs.yaml and run stubs dep update.

version

The format: v2, written by stubs dep update. Older v1 and v1beta1 lock files are rewritten as v2 the next time it runs.

deps

One entry per module, in name order:

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

Without a stubs.lock, stubs resolves dependencies each time it runs and writes nothing, and a dependency that can't be found stops the command.