A Go Build Failed. I Wanted to Replay It Without the Original Project.
说明与用途
REW 将失败的 Go 构建捕获为可移植的 .bfc 容器,并在 Docker 容器中重放,便于在没有原始源代码的情况下调试。
问题
Reproducing a failed Go build on another machine requires the exact source files, module dependencies, toolchain, and build settings, which are not always captured by a build log.
结果
The REW workflow successfully reproduced a deliberately introduced compilation error in the Cobra project, demonstrating that a failed build can be captured and replayed without the original source checkout.
工作流
- Build fails → Capture → Transfer → Replay → Compare
- Run
go build ./...with environment variables set to disable CGO, workspaces, and proxy - Execute
REW_BIN capture --v3 --include-go-sources -- go build ./...to createfailure.bfc - Transfer
failure.bfcto another machine - Execute
REW_BIN replay --v3 --allow-command --memory 1g failure.bfcinside Docker - Compare original and replay exit codes and stderr to confirm reproduction
证据
REW collects selected inputs involved in the failed build and packages them into a portable .bfc capsule.
The capsule can then be verified and replayed inside a Docker container with networking disabled.
REW considers the failure reproduced when its current comparison checks match the original exit code and complete stderr.
REW also has limits on capsule size, workspace files, and dependency artifacts.
- 记录日期: 2026-10-13T15:56:09.163Z