mesh-build-go publishes the build runner as its own package, so the other build modules share it without mesh-sdk (ADR 0593 §1)
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
This commit is contained in:
@@ -20,7 +20,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/buildstep"
|
||||
"git.novox.be/novox/mesh-catalog/modules/mesh-build-go/buildstep"
|
||||
sdkstep "git.novox.be/novox/mesh-sdk/go/buildstep"
|
||||
"git.novox.be/novox/mesh-sdk/go/forgekey"
|
||||
)
|
||||
|
||||
@@ -55,15 +56,15 @@ type TestResult struct {
|
||||
// the catalogue's TypeScript against the bounds is a later release's (R4f), not this one's gate.
|
||||
OverBound bool `json:"over_bound"`
|
||||
Failed []Failure `json:"failed,omitempty"`
|
||||
// By is the build module and the SDK it was built with (buildstep.By): the checker names it when a failure hides
|
||||
// By is the build module and the SDK it was built with (sdkstep.By): the checker names it when a failure hides
|
||||
// its cause.
|
||||
By string `json:"by,omitempty"`
|
||||
}
|
||||
|
||||
// Failure is the SDK's failure contract (buildstep.Failure, issue 1901): a failing test of the test script, read from
|
||||
// Failure is the SDK's failure contract (sdkstep.Failure, issue 1901): a failing test of the test script, read from
|
||||
// node's TAP reporter, or a type-check or build that failed, each with its cause (never empty, never a passing line) and
|
||||
// its own output up to 4096 bytes, cause first.
|
||||
type Failure = buildstep.Failure
|
||||
type Failure = sdkstep.Failure
|
||||
|
||||
func (m *Module) testTool() StepTool {
|
||||
return StepTool{
|
||||
@@ -106,7 +107,7 @@ func (m *Module) test(ctx context.Context, args map[string]any) (any, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res := &TestResult{Workspace: workspace, Module: module, Level: level, By: buildstep.By("mesh-build-node")}
|
||||
res := &TestResult{Workspace: workspace, Module: module, Level: level, By: sdkstep.By("mesh-build-node")}
|
||||
script := "test"
|
||||
if level == "integration" {
|
||||
script = "test:integration"
|
||||
@@ -203,7 +204,7 @@ func testFailures(where, name, dir string, r forgekey.Ran, report string) []Fail
|
||||
if name == "test" || name == "test:integration" {
|
||||
return buildstep.ReadTAP(where, name, dir, report, r.Stdout+"\n"+r.Stderr)
|
||||
}
|
||||
return []Failure{buildstep.ConsoleFailure(where, name, r.Stdout+"\n"+r.Stderr)}
|
||||
return []Failure{sdkstep.ConsoleFailure(where, name, r.Stdout+"\n"+r.Stderr)}
|
||||
}
|
||||
|
||||
// failureWhy is the words of one failure: the test or check that failed, where, and its cause.
|
||||
|
||||
Reference in New Issue
Block a user