The builder finds a build module as the indexer's seed does: the build seat whose acting rule `build` has an `on` matching the artifact's language or kind:image, and that seat's holder, read from the seat list's definitions and the claims of the catalog half's manifests. Task.Module, every lane key, the unpublished modules, the toolchain sources, the ends watched, the sayer and builder_stuck (through `<seat>.steps`) derive from it; the floor's sources are the holders of the seats git and mesh-catalog. buildrun.GoBuildModule, NodeBuildModule, LanguageOf, buildstep.BuildModuleOf use, build.ImageBuildModule and StuckBuildModules are gone from the builder (the checker keeps its own names in two small files until its part reads them from the list). Builds: design 47 G §7, §428, §704, §204, A-82 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
24 lines
1.1 KiB
Go
24 lines
1.1 KiB
Go
package build
|
|
|
|
import (
|
|
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/buildrun"
|
|
"git.novox.be/novox/mesh-sdk/go/seatdef"
|
|
)
|
|
|
|
// The build modules of the fixture seat list: the holders of the three build seats (design 47 G A-82).
|
|
const (
|
|
testGo = "mesh-build-go"
|
|
testNode = "mesh-build-node"
|
|
testImage = "mesh-build-image"
|
|
)
|
|
|
|
// testSeats is the finder over a seat list whose build seats act on go, typescript and kind:image, each held by its module.
|
|
func testSeats() *buildrun.BuildSeats {
|
|
rule := func(on string) seatdef.Definition {
|
|
return seatdef.Definition{Acts: []seatdef.ActingRule{{Step: seatdef.StepBuild, On: on}}}
|
|
}
|
|
defs := map[string]seatdef.Definition{"node-build-go": rule("go"), "node-build-node": rule("typescript"), "node-build-image": rule(seatdef.OnKindImage)}
|
|
holders := map[string]string{"node-build-go": testGo, "node-build-node": testNode, "node-build-image": testImage}
|
|
return buildrun.NewBuildSeats(func() map[string]seatdef.Definition { return defs }, func(seat string) (string, bool) { h, ok := holders[seat]; return h, ok })
|
|
}
|