Spin up a new worktree FAST, with cabal-buck2 A developer walkthrough shows how to pair cabal-buck2 with a bazel-remote build cache so a freshly created git worktree builds almost instantly instead of from cold. The setup runs bazel-remote 2.6.4 with a 20 GB max cache size on gRPC address 127.0.0.1:9092, configures the project via `cabal buck2 --enable-tests --cache=grpc://127.0.0.1:9092`, then repeats that command in the new worktree before running `buck2 build //...`. On the Cabal project itself, the author reports the clean build in the fresh worktree took 1.3s. Something we often want to do is create a new worktree to work on a bug, PR, or small feature, especially if you’re forking off tasks for an AI to work on. Creating the worktree is easy, but to build and test the changes, you’re starting from a cold build. I want to run through quickly how to set things up so that you can spin up a new worktree and use cabal-buck2 to pull build artifacts from a cache, so the build in the fresh worktree is ready instantly. Get a build cache running. I use bazel-remote https://github.com/buchgr/bazel-remote/releases , you can grab one of the releases or build from source. Start the cache, e.g. ./bazel-remote-2.6.4-linux-amd64 --dir ~/.cache/buck2 --max size 20 --grpc address 127.0.0.1:9092 --http address 127.0.0.1:8080 Next get yourself set up with cabal-buck2 https://hackage.haskell.org/package/cabal-buck2 - the README explains what you need. Then set up your project with cabal-buck2 and tell it to use the local cache: cabal buck2 --enable-tests --cache=grpc://127.0.0.1:9092 build and run tests: buck2 build //... buck2 test //... Now the build cache is warm, we can create a new worktree: git worktree add /tmp/worktree -b tmp cd buck2 && git worktree add /tmp/worktree/buck2 -b tmp Run cabal buck2 in the new worktree, again telling it to use the cache: cd /tmp/worktree cabal buck2 --enable-tests --cache=grpc://127.0.0.1:9092 And the build should now be almost instant: buck2 build //... When I tried this just now on the Cabal project itself, the clean build took 1.3s.