Skip to content

hiiu build

Mirror a committed revision into a content-addressed base, write the overlay over it, and install with the app's own package manager.

hiiu build [path]

Compiles a source revision, a configuration and a generator version into an immutable base under ~/.cache/hiiu/bases/<id>/.

A second build of one revision is a cache hit that re-runs nothing. Writes only under the cache; the analysed repo is read by git and never written.

Arguments and flags

[path] The repo or app directory to build. Default .
--decisions <file> The confirmed decisions document to build against
--no-install Reuse the mirrored source's dependencies instead of installing
--offline Forbid the package manager from reaching the network

Every global flag also applies.

It needs a clean tree

No revision, or a dirty working tree, is exit 3 naming what to do. A base is addressed by the revision it came from, so an uncommitted change has no address and could not be cached or later identified.

Installing

The install uses the app's own package manager and the app's own lockfile, because hoisting differs between package managers and a base installed with the wrong one is a copy of an app that subtly is not yours.

--no-install skips it and reuses whatever the mirror carried, which is much faster and only correct if you know the dependencies are already right. --offline keeps the install but forbids the network, which is the flag to reach for when you want to prove a build is not silently fetching.

Exit codes

Code When
0 Built, or a cache hit
3 Dirty tree, no revision, or not a supported app
4 The app failed to build

Example

hiiu build --json | jq '{id, cached}'