The runner, the toolchain guard, the fetch, the parsers, buildcpu, the conformance kit and mesh-pack move from mesh-sdk's buildstep into modules/mesh-build-go/buildstep (own go.mod). mesh-build-go, mesh-build-node and mesh-build-image require it by a same-repository replace; what the delivery parts read (the failure contract, the fetch request, the stale sweep, the module tree shape, NewID, CapacitySetting) stays imported from mesh-sdk as sdkstep. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
15 lines
509 B
Go
15 lines
509 B
Go
package buildstep
|
|
|
|
import (
|
|
"os"
|
|
|
|
"git.novox.be/novox/mesh-catalog/modules/mesh-build-go/buildstep/buildcpu"
|
|
)
|
|
|
|
// NodeLimits is what one step of a build module is held to (novox/hq ADR 0553 §4): the node's processor share from the
|
|
// word the composer gives the module (buildcpu.ShareWord), divided by the module's own capacity, own, over the machine's
|
|
// processors. Without the word, no thread limit: Threads is 0.
|
|
func NodeLimits(own int) buildcpu.Limits {
|
|
return buildcpu.FromWords(os.Getenv, own)
|
|
}
|