You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Error Messages**: Provide actionable error messages with context
377
377
-**Logging**: Use appropriate log levels (DEBUG, INFO, WARNING, ERROR)
378
378
379
+
## Build System Standards
380
+
381
+
OpenSandbox produces native Go binaries for `components/execd`, `components/ingress`,
382
+
`components/egress`, `kubernetes`, and `sdks/sandbox/go`. These build systems must
383
+
preserve caller-provided build flags and only append project-required flags.
384
+
385
+
### Build Variables
386
+
387
+
- Go builds pass caller-provided `GOFLAGS` to `go build` and append project flags such as `-trimpath` and `-buildvcs=false`.
388
+
- Go linker builds pass caller-provided `LDFLAGS` to `go build -ldflags` and append project metadata flags.
389
+
- When CGO is enabled, the Go toolchain honors `CC`, `CXX`, `CGO_CFLAGS`, `CGO_CXXFLAGS`, and `CGO_LDFLAGS`. Docker-based builds also accept `CFLAGS` and `CXXFLAGS` as fallbacks for `CGO_CFLAGS` and `CGO_CXXFLAGS`.
390
+
- Docker build scripts forward these variables as build arguments when they are present in the environment.
391
+
392
+
### Debug Information
393
+
394
+
Default project builds must not strip debug information. Do not add `strip`,
395
+
`install -s`, or Go linker flags such as `-s -w` to the default build path.
396
+
Distribution-specific packaging may strip binaries only outside the default
397
+
developer and CI build path.
398
+
399
+
### Build Dependency Graph
400
+
401
+
Use package-aware build tools instead of recursive independent builds:
402
+
403
+
- Go packages are built through `go build ./...` or explicit Go package entry points.
404
+
- Kotlin projects use Gradle task dependencies.
405
+
- JavaScript and TypeScript SDKs use pnpm workspace dependencies.
406
+
- C# SDKs use solution/project references through `dotnet build`.
407
+
408
+
Subdirectory-specific Make targets may delegate to these tools, but they must not
409
+
replace the build tool's dependency graph with independent recursive directory
410
+
builds where cross-directory dependencies exist.
411
+
412
+
### Repeatable Builds
413
+
414
+
Native Go binary builds include `-trimpath`, `-buildvcs=false`, and `-ldflags`
415
+
with `-buildid= -B none` so that source paths, VCS metadata, and build IDs or
416
+
Mach-O UUIDs do not make binaries differ. For repeatable release metadata, set `SOURCE_DATE_EPOCH`
417
+
or set `BUILD_TIME`, `VERSION`, and `GIT_COMMIT` explicitly before invoking
418
+
Makefile or Docker build scripts. When `SOURCE_DATE_EPOCH` is set and
419
+
`BUILD_TIME` is unset, build scripts derive `BUILD_TIME` from
0 commit comments