<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alimkhan Slambek</title>
    <description>The latest articles on DEV Community by Alimkhan Slambek (@slambek).</description>
    <link>https://dev.to/slambek</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4182457%2F3ac29483-5af2-4515-9aec-6fb7e91a1575.jpg</url>
      <title>DEV Community: Alimkhan Slambek</title>
      <link>https://dev.to/slambek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/slambek"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alimkhan Slambek</dc:creator>
      <pubDate>Wed, 14 Oct 2026 04:19:43 +0000</pubDate>
      <link>https://dev.to/slambek/-f46</link>
      <guid>https://dev.to/slambek/-f46</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f" class="crayons-story__hidden-navigation-link"&gt;A Go Build Failed. I Wanted to Replay It Without the Original Project.&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/slambek" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4182457%2F3ac29483-5af2-4515-9aec-6fb7e91a1575.jpg" alt="slambek profile" class="crayons-avatar__image" width="460" height="460"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/slambek" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Alimkhan Slambek
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Alimkhan Slambek
                
                
              
              &lt;div id="story-author-preview-content-4845099" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/slambek" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4182457%2F3ac29483-5af2-4515-9aec-6fb7e91a1575.jpg" class="crayons-avatar__image" alt="" width="460" height="460"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Alimkhan Slambek&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 13&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f" id="article-link-4845099"&gt;
          A Go Build Failed. I Wanted to Replay It Without the Original Project.
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/go"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;go&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/docker"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;docker&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;3&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>debugging</category>
      <category>go</category>
      <category>programming</category>
    </item>
    <item>
      <title>A Go Build Failed. I Wanted to Replay It Without the Original Project.</title>
      <dc:creator>Alimkhan Slambek</dc:creator>
      <pubDate>Tue, 13 Oct 2026 14:54:13 +0000</pubDate>
      <link>https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f</link>
      <guid>https://dev.to/slambek/a-go-build-failed-i-wanted-to-replay-it-without-the-original-project-4i9f</guid>
      <description>&lt;p&gt;A build log tells you what went wrong. It doesn't always give you what you need to reproduce it.&lt;/p&gt;

&lt;p&gt;If a Go build fails on another machine, you might need the exact source files, module dependencies, toolchain, and build settings before you can investigate the same failure locally.&lt;/p&gt;

&lt;p&gt;I started building &lt;strong&gt;REW&lt;/strong&gt; to explore a simple idea:&lt;/p&gt;

&lt;p&gt;What if you could save a failed build as a file, move it to another machine, and replay it without the original checkout?&lt;/p&gt;

&lt;p&gt;It's an open-source CLI written in Go. The first public release is available now, although it's still a pretty limited alpha.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;I wanted a workflow that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build fails → Capture → Transfer → Replay → Compare&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of saving only the compiler output, REW collects selected inputs involved in the failed build and packages them into a portable &lt;code&gt;.bfc&lt;/code&gt; capsule.&lt;/p&gt;

&lt;p&gt;That includes selected workspace files, verified Go module artifacts, build environment metadata, stdout, stderr, and the original exit code.&lt;/p&gt;

&lt;p&gt;The capsule can then be verified and replayed inside a Docker container with networking disabled.&lt;/p&gt;

&lt;p&gt;The important distinction is that this isn't a VM snapshot or a complete copy of the original machine. REW captures a specific, bounded set of build inputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real example
&lt;/h2&gt;

&lt;p&gt;To test the current alpha, I used a controlled compiler failure in the open-source Cobra project.&lt;/p&gt;

&lt;p&gt;I intentionally introduced a compilation error, captured the failed build with REW, and replayed the resulting capsule using Docker without relying on the original checkout.&lt;/p&gt;

&lt;p&gt;The failure reproduced in that test.&lt;/p&gt;

&lt;p&gt;Here's the terminal recording:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0dzk14ska0v9bj2dpe7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0dzk14ska0v9bj2dpe7.gif" alt="REW capture and replay demo" width="799" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a deliberately broken build, not a production incident. I wanted to establish that the basic workflow worked before asking other developers to try it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying it yourself
&lt;/h2&gt;

&lt;p&gt;Here's a smaller example you can reproduce locally.&lt;/p&gt;

&lt;p&gt;You'll need REW v0.1.0-alpha.5, Go 1.26.6, and Docker with Linux AMD64 container support.&lt;/p&gt;

&lt;p&gt;Installation instructions and downloadable binaries for macOS ARM64 and Linux AMD64 are in the &lt;a href="https://github.com/rewtools/rew#install" rel="noopener noreferrer"&gt;README&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once REW is installed, set &lt;code&gt;REW_BIN&lt;/code&gt; to the absolute path of its executable.&lt;/p&gt;

&lt;p&gt;First, create a minimal project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;rew-example
&lt;span class="nb"&gt;cd &lt;/span&gt;rew-example

&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; go.mod &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
module example.com/rew-quickstart

go 1.26.0
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; main.go &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
package main

func main() {
    undefinedFunction()
}
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The build will fail because &lt;code&gt;undefinedFunction&lt;/code&gt; doesn't exist.&lt;/p&gt;

&lt;p&gt;Now capture that failure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CGO_ENABLED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0 &lt;span class="nv"&gt;GOOS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;linux &lt;span class="nv"&gt;GOARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;amd64 &lt;span class="nv"&gt;GOFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nv"&gt;GOWORK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;off &lt;span class="nv"&gt;GOTOOLCHAIN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;GOPROXY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;off &lt;span class="nv"&gt;GOSUMDB&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;off &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REW_BIN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; capture &lt;span class="nt"&gt;--v3&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--include-go-sources&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; go build ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;REW records the failed execution in &lt;code&gt;failure.bfc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The capture command normally returns the same nonzero exit code as the original failed build. That's expected.&lt;/p&gt;

&lt;p&gt;Next, replay the capsule:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REW_BIN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; replay &lt;span class="nt"&gt;--v3&lt;/span&gt; &lt;span class="nt"&gt;--allow-command&lt;/span&gt; &lt;span class="nt"&gt;--memory&lt;/span&gt; 1g failure.bfc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this example, the expected result is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original exit code: 1
Replay exit code:   1
Outcome:            reproduced
Replay memory:      1 GiB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;REW considers the failure reproduced when its current comparison checks match the original exit code and complete stderr.&lt;/p&gt;

&lt;p&gt;It doesn't mean every detail of the original environment was reconstructed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens inside the capsule?
&lt;/h2&gt;

&lt;p&gt;This was one of the more interesting parts of building REW.&lt;/p&gt;

&lt;p&gt;A compiler error is usually easy to save as text. The harder part is figuring out what needs to travel with that error so the build can run again elsewhere.&lt;/p&gt;

&lt;p&gt;REW's current capture workflow selects Go source files, module metadata, and dependency artifacts under explicit limits.&lt;/p&gt;

&lt;p&gt;For external Go modules, it verifies the relevant cached artifacts before including them.&lt;/p&gt;

&lt;p&gt;The capsule also contains a manifest and integrity metadata, so replay can check the packaged contents before using them.&lt;/p&gt;

&lt;p&gt;For replay, REW reconstructs the selected workspace and dependency inputs inside a Linux AMD64 Docker environment, without depending on the original host checkout.&lt;/p&gt;

&lt;p&gt;The build then runs inside a Linux AMD64 Docker container with networking disabled.&lt;/p&gt;

&lt;p&gt;This doesn't turn Docker into a security sandbox. A capsule still contains executable instructions, and you should only replay capsules from sources you trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What doesn't work yet
&lt;/h2&gt;

&lt;p&gt;I'm keeping the first release intentionally narrow.&lt;/p&gt;

&lt;p&gt;Right now, the supported workflow is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go 1.26.6&lt;/li&gt;
&lt;li&gt;The exact command &lt;code&gt;go build ./...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Linux AMD64 Docker replay&lt;/li&gt;
&lt;li&gt;Selected workspace files and verified external module artifacts&lt;/li&gt;
&lt;li&gt;Offline replay once the required Docker image is available&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are important limitations.&lt;/p&gt;

&lt;p&gt;Active &lt;code&gt;go.work&lt;/code&gt; workspaces aren't supported. CGO and custom build tags aren't supported in this workflow either. Some module configurations and build inputs need additional work.&lt;/p&gt;

&lt;p&gt;REW also has limits on capsule size, workspace files, and dependency artifacts.&lt;/p&gt;

&lt;p&gt;It isn't intended to capture arbitrary CI jobs, and it won't reproduce every build failure.&lt;/p&gt;

&lt;p&gt;There's another trade-off: a capsule may contain source code and build metadata. That makes it useful for debugging, but it also means you need to review its contents before sharing it.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/rewtools/rew#known-limitations" rel="noopener noreferrer"&gt;README&lt;/a&gt; documents the current limitations in more detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm trying to learn next
&lt;/h2&gt;

&lt;p&gt;The controlled examples work, but I still don't know how well REW handles Go projects I haven't tested myself.&lt;/p&gt;

&lt;p&gt;I'm especially interested in unusual module layouts, embedded resources, missing build inputs, or cases where replay produces a different error.&lt;/p&gt;

&lt;p&gt;There's also a bigger question I'm trying to answer: is saving a failed build as a capsule actually useful, or is running the same build in Docker with the original checkout usually enough?&lt;/p&gt;

&lt;p&gt;I don't have a good answer to that yet.&lt;/p&gt;

&lt;p&gt;If you're working with Go and have 10–15 minutes, I'd really appreciate you trying the &lt;a href="https://github.com/rewtools/rew#quick-start-reproduce-a-failed-build" rel="noopener noreferrer"&gt;alpha.5 quickstart&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You don't need to get a successful replay. If capture fails, a dependency is missing, or something behaves unexpectedly, that's useful feedback too.&lt;/p&gt;

&lt;p&gt;You can leave the result here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/rewtools/rew/issues/59" rel="noopener noreferrer"&gt;Alpha testing — GitHub Issue #59&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And if the whole approach doesn't seem useful for your workflow, I'd be interested in hearing why.&lt;/p&gt;

&lt;p&gt;REW is open source under Apache 2.0:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rewtools/rew" rel="noopener noreferrer"&gt;https://github.com/rewtools/rew&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm still figuring out where this approach makes sense and where it doesn't.&lt;/p&gt;

</description>
      <category>go</category>
      <category>devops</category>
      <category>opensource</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
