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