Multiple vms vs worktrees

Discussion lvb 23 days ago

Hi. This is the first time I've been able to so easily and quickly create vms for development. I'm now wondering what the tradeoffs are of changing my model from the currentheavy use of worktrees and something like herdr, to instead splitting work across vms. The vms obviously have a clear advantage for disparate setups, but in the case of concurrent work against the same repo, are the two approaches equivalent since the resource pool is fixed and spread across the vms anyway?

1 Comment

crawshaw 17 days ago

This is a good question! Worktrees can definitely work. The thing I like about separate VMs is it helps agents run test suites. E.g. the exe.dev server starts on a fixed dev port, and if two agents are working in two worktrees, they can accidentally look at each other's running servers and get confused.

The VM-per-branch approach works well with the cp command, because our VMs are copy-on-write.