Summary
The latest release 1.18.1 of github.com/kurtosis-tech/kurtosis/api/golang cannot be built by external Go consumers. Compilation fails with:
github.com/kurtosis-tech/kurtosis/api/golang@v1.18.1/core/lib/enclaves/enclave_context.go:762:39:
undefined: path_compression.ComputeContentHash
Reproduction
mkdir kurtosis-test && cd kurtosis-test
go mod init kurtosis-test
cat > main.go <<'GOEOF'
package main
import (
"context"
"fmt"
"os"
"github.com/kurtosis-tech/kurtosis/api/golang/engine/lib/kurtosis_context"
)
func main() {
ctx := context.Background()
kCtx, err := kurtosis_context.NewKurtosisContextFromLocalEngine()
if err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) }
info, err := kCtx.GetEngineInfo(ctx)
if err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) }
fmt.Println(info.GetEngineVersion())
}
GOEOF
go get github.com/kurtosis-tech/kurtosis/api/golang@1.18.1
go build ./...
Tested with go 1.26.2 on darwin/arm64.
Root cause
api/golang/go.mod has:
replace (
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang => ../../grpc-file-transfer/golang
github.com/kurtosis-tech/kurtosis/path-compression => ../../path-compression
)
These local replace directives only apply inside the monorepo — they are ignored when api/golang is consumed as a module. External builds therefore resolve github.com/kurtosis-tech/kurtosis/path-compression to the latest tagged pseudo-version v0.0.0-20240307154559-64d2929cd265, which does not export ComputeContentHash. The function is referenced from core/lib/enclaves/enclave_context.go:762, so the build fails.
Suggested fix
Cut a tagged release of path-compression (and grpc-file-transfer/golang) that includes ComputeContentHash, then bump the require lines in api/golang/go.mod to that version and drop the local replace directives (or keep them but ensure the require versions can also build standalone).
Environment
go version go1.26.2 darwin/arm64
github.com/kurtosis-tech/kurtosis/api/golang v1.18.1
- Resolved
path-compression v0.0.0-20240307154559-64d2929cd265
Summary
The latest release
1.18.1ofgithub.com/kurtosis-tech/kurtosis/api/golangcannot be built by external Go consumers. Compilation fails with:Reproduction
Tested with
go 1.26.2on darwin/arm64.Root cause
api/golang/go.modhas:These local
replacedirectives only apply inside the monorepo — they are ignored whenapi/golangis consumed as a module. External builds therefore resolvegithub.com/kurtosis-tech/kurtosis/path-compressionto the latest tagged pseudo-versionv0.0.0-20240307154559-64d2929cd265, which does not exportComputeContentHash. The function is referenced fromcore/lib/enclaves/enclave_context.go:762, so the build fails.Suggested fix
Cut a tagged release of
path-compression(andgrpc-file-transfer/golang) that includesComputeContentHash, then bump therequirelines inapi/golang/go.modto that version and drop the localreplacedirectives (or keep them but ensure therequireversions can also build standalone).Environment
go version go1.26.2 darwin/arm64github.com/kurtosis-tech/kurtosis/api/golang v1.18.1path-compression v0.0.0-20240307154559-64d2929cd265