Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A Go Build Failed. I Wanted to Replay It Without the Original Project.

Description and use

REW captures failed Go builds into a portable .bfc capsule and replays them in a Docker container, enabling debugging without the original source checkout.

Problem

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.

Outcome

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.

Workflow

  • 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 create failure.bfc
  • Transfer failure.bfc to another machine
  • Execute REW_BIN replay --v3 --allow-command --memory 1g failure.bfc inside Docker
  • Compare original and replay exit codes and stderr to confirm reproduction

Evidence

REW collects selected inputs involved in the failed build and packages them into a portable .bfc capsule.

Source

The capsule can then be verified and replayed inside a Docker container with networking disabled.

Source

REW considers the failure reproduced when its current comparison checks match the original exit code and complete stderr.

Source

REW also has limits on capsule size, workspace files, and dependency artifacts.

Source

  • Record date: 2026-10-13T15:56:09.163Z