Skip to main content
build turns the repository into the tree the app blob holds. It compiles each workflow folder’s code and packs its widgets into the definitions, copies everything else, and writes the result to build/. It makes no API call. It needs no credential and no connectivity, so it runs in a checkout, a pre-commit hook or the first step of CI. build/ is a pure function of the sources: the same sources give the same bytes.

Synopsis

What it does

  1. Reads app.yaml and each folder under blobs/ with its blob.yaml.
  2. Copies app.yaml, README.md, LICENSE and everything under schemas/.
  3. For each folder under blobs/:
    • A workflow folder is compiled: each definition that binds code through build is written, compiled, at its file path; a widget project is packed from its widget.yaml and the dist/ its own build wrote; blob.yaml is written without its build keys and with each definition’s resolved category; every other definition’s file and every objects[].file is copied. Source directories such as src/, __pycache__ and dot entries are not.
    • Any other blob type is copied as it is.
  4. Writes only the files whose bytes changed, and deletes files in build/ the sources no longer produce.
It prints a line per blob, saying whether the folder was compiled or copied and what it holds, then the result:
Code compiles without an allowlist, so a third-party import the compiler cannot verify is reported as the advisory IMPORT_UNVERIFIED and the build goes on. Without --library-catalog, a widget that declares libraries draws the advisory WIDGET_LIBRARIES_UNVERIFIED: the build calls nothing, so it has no catalog to check them against. A code message without a created_at gets a fixed one, so two builds are byte-identical. When git does not ignore build/, the advisory BUILD_NOT_IGNORED says so; outside a git repository it is silent. The advisories go to stderr and leave the exit code 0.

Paths and producers

A code entry and a widget project each sit in a directory below their blob’s folder. A published path has one producer: two definitions with the same file, or an objects[].file naming a definition’s file or blob.yaml, is MANIFEST_INVALID.

Errors

Every code above, with its remediation, is in Error codes.

See also