Stacker: tool to bump snapshots in `stack*.yaml` files

When I learned last Fall that coding agents can now do a decent job I wondered what productivity tool I always wanted for maintaining Haskell project and found a little job that I could mechanize: bump the value of the `snapshot` (or `resolver`) field in `stack*.yaml` files to the latest in the respective LTS or nightly series. So I vibe-coded last December a little command-line tool that does that routine job for me, using Github Copilot.
Release of the resulting tool, `stacker`, was delayed by the unfortunate state of Stackage (Jan-Mar 2026) that had bumped nightly to a compiler (9.12.3) that never went live on ghcup. Now with GHC 9.12.4 the latest nightly is usable again, so that is a good time to ship it!

Example run:

$ stacker

stack-9.0.yaml      lts-19.33                ✓ up to date
stack-9.10.yaml     lts-24.28                → bump to lts-24.36
stack-9.12.yaml     nightly-2025-10-14       → bump to nightly-2026-04-01
stack-9.2.yaml      lts-20.26                ✓ up to date
stack-9.4.yaml      lts-21.25                ✓ up to date
stack-9.6.yaml      lts-22.44                ✓ up to date
stack-9.8.yaml      lts-23.28                ✓ up to date
stack.yaml          nightly-2025-10-14       = symlink to stack-9.12.yaml
$ stacker bump

Updating stack-9.10.yaml
Updating stack-9.12.yaml

Recommendation: use in version-controlled directories so you can undo changes.

Genesis: I started by writing a specification including examples (what is now the README) and then asked Copilot to implement it. The first version was buggy but the behavior could be corrected quickly. The testsuite wasn’t done properly at first because the agent replicated some code in the testsuite—of course, that does not adequately test the product, that just fakes it! Most annoying was getting the Windows part of the CI to work since Copilot does not run CI and learn from it. Since the golden values contain file paths and unicode characters, there were several iterations needed to get the test suite run correctly under Windows. The coding style isn’t to my standards but for a little productivity tool I can make compromises. Giving clear style instructions could potentially help, I have not tried this.

My verdict on agentic Haskell programming for now is: I can see myself vibe-coding more small tools, but I don’t have a feeling yet whether I could use agents for more demanding coding or for working on real code bases.

7 Likes

I was thinking of implementing resolver bumping in Renovate, but I didn’t since it seemed like a lot of work to implement everything stack-lint-extra-deps does.

I am curious, did you try using stack-lint-extra-deps to bump the resolver, and did you have any issues with it?