Documentation
¶
Overview ¶
Package pigletbuild validates Piglet closure and builds source or binary Piglet artifacts.
Piglet Binary build implementation. The public entry point is only `pig piglet build`; no standalone build namespace is exposed.
Package pigletbuild hosts Piglet Binary planning while orchestration is moved to the final Piglet artifact package. The planner is factual: compatible Go factories fuse; every other extension is an exact subprocess component.
Index ¶
- func RunPigletBuildCommand(args []string, stdout, stderr io.Writer) int
- func RunPigletPublishCommand(args []string, stdout, stderr io.Writer) int
- type BuilderBackend
- type BuilderReadiness
- type BuilderRequest
- type BuilderResult
- type BuilderUnavailableError
- type Compat
- type ContainerBuilderConfig
- type Decision
- type ExtPlan
- type ExtensionInput
- type Language
- type NoBuilderReadyError
- type Options
- type Plan
- type Sandbox
- type Target
- type Verdict
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunPigletBuildCommand ¶
RunPigletBuildCommand handles the sole public Piglet output build path.
Types ¶
type BuilderBackend ¶
type BuilderBackend interface {
Name() string
Probe(context.Context, BuilderRequest) BuilderReadiness
Build(context.Context, BuilderRequest) (BuilderResult, error)
}
BuilderBackend probes and executes one build provenance. Probe must have no authentication, prompt, download, or mutation side effects. pig additive (D18): Piglet Binary builds select generic named builders.
type BuilderReadiness ¶
type BuilderReadiness struct {
Builder string `json:"builder"`
Ready bool `json:"ready"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Remedy string `json:"remedy,omitempty"`
}
BuilderReadiness is the side-effect-free probe result used by auto selection and non-interactive remediation.
type BuilderRequest ¶
type BuilderRequest struct {
Piglet *piglet.Piglet
Cells []subprocess.CellSpec
Options Options
Output string
Stdout io.Writer
Stderr io.Writer
}
BuilderRequest is one already-validated, locked Piglet build request.
type BuilderResult ¶
BuilderResult identifies the output produced by exactly one backend.
type BuilderUnavailableError ¶
type BuilderUnavailableError struct {
}
BuilderUnavailableError carries one exact readiness result to JSON callers.
func (*BuilderUnavailableError) Error ¶
func (e *BuilderUnavailableError) Error() string
type Compat ¶
type Compat string
Compat describes whether a target/component pair is available without a target-side build toolchain.
type ContainerBuilderConfig ¶
type ExtPlan ¶
type ExtPlan struct {
Extension string `json:"extension"`
Decision Decision `json:"decision"`
Reason string `json:"reason,omitempty"`
Compat map[string]Compat `json:"compat"`
}
ExtPlan is one extension's realization and target compatibility.
type ExtensionInput ¶
ExtensionInput contains the runtime-cell facts needed for one decision.
type NoBuilderReadyError ¶
type NoBuilderReadyError struct {
Readiness []BuilderReadiness
}
NoBuilderReadyError carries every side-effect-free probe result for auto.
func (*NoBuilderReadyError) Error ¶
func (e *NoBuilderReadyError) Error() string
type Options ¶
type Options struct {
Format string
Locked bool
Record string
Targets []Target
Sandbox Sandbox
BakedSettings []byte
Version string
Builder string
Verification string
Workspace string
// SignKeyPath is the ed25519 private key a Piglet Binary is signed with.
SignKeyPath string
// SignKey is SignKeyPath's key, read before any build work starts.
SignKey ed25519.PrivateKey
}
Options configures one Piglet output build. Component realization is not configurable; it is derived from component facts.
type Plan ¶
type Plan struct {
Targets []string `json:"targets"`
Ext []ExtPlan `json:"plan"`
Warnings []Warning `json:"warnings"`
}
Plan is the deterministic Piglet Binary delivery plan.
func BuildPlan ¶
func BuildPlan(extensions []ExtensionInput, options Options) Plan
BuildPlan derives realization and target compatibility from extension facts.
type Verdict ¶
Verdict reports whether resolution produced a complete buildable Piglet.
func Validate ¶
func Validate(plan Plan, resolutionWarnings []string, extensionCount int, requireFused bool) Verdict
Validate rejects unresolved or empty Piglet extension sets and enforces an authored realization requirement. Advisory target compatibility warnings are represented in the plan and do not masquerade as a successful self-contained target.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package binarypiglet holds the Piglet and resolution record embedded in a Piglet Binary.
|
Package binarypiglet holds the Piglet and resolution record embedded in a Piglet Binary. |