Axis / Build System / Package
Package
A Package produces named immutable results and an optional installation contribution from one configured input. It owns build and installation phases, verified reuse and compiler-cache partitioning. It does not resolve a dependency graph or compose an entire operating system.
Source and concrete API: package.go.
Properties
-
Package: one selected input and itsConfig. Each value is invocation-local and used serially. -
Config: declaration catalog, execution capabilities and image, machine properties, allocated tool inputs, storage paths and execution coordinates. -
Jobs,LogandProgress: resource allocation and observation.Jobsmay change between phase calls, but never during a running call. -
EnsureEnvironment: a lazy callback that checks execution availability only after a reuse miss.
Behavior
New associates one configured input with caller-supplied capabilities. Package.Build verifies a reusable named-output result before executing the build handler. Source trees are materialized after a phase-cache miss, not merely to rediscover a valid result.
Package.Install obtains a logical installation tree. An absent install handler contributes an empty tree and must not force unnecessary compilation. Installation may use already produced named outputs; it does not write directly to the host destination.
Package.Counts reports reused and executed phase counts. Verification time still occurs on a reuse hit and must not be described as no elapsed work.
Independent values may execute concurrently when they have distinct configured inputs and safe shared execution and observation capabilities. Calls on one value and its configured input must remain serial. A successful build result is retained for the later install call; it is not rebuilt merely because its job allocation changes.
Phase inputs and publication
Effective options, source content, captured handler code, allocated tools, execution image, machine roles and used inputs determine reuse. Diagnostic provenance and storage-directory spelling are not semantic inputs. Output validation precedes publication; incomplete content is not a reusable result.
An installation tree records paths, file bytes, modes, ownership and symlinks. Its directories have no eventual host prefix. Upstream staging paths are private execution details. An alternate install destination does not require reconfiguration or compilation.
Persistent compiler caches are partitioned by relevant handler, machine, execution and tool identities. Their lifetime is caller-owned and separate from immutable phase results.
Native spelling
The public import is axis/build/package; its Go package name is buildpackage because package is a language keyword.