143 days ago · 16 min read3213 words · Tech · hide · Fediverse post

Go 1.26 rebuilt go fix from scratch. If you haven’t tried it yet, give it a spin: it rewrites the code in your module to use modern language and library features. It has quickly become one of my favorite features, and LLMs are a big part of why. Models tend to use old APIs, and sometimes they deny that a new API exists even when you point them to it. Coaxing a model is non-deterministic. go fix is a better way to keep code on the latest features of the language. Run it locally or in CI and the dated idioms get rewritten deterministically. Alan Donovan’s GopherCon talk argues that future models train on today’s open-source Go, so the corpus itself needs modernizing too. A proper revival # go fix is almost as old as Go. Before the Go 1 compatibility promise, the language and standard library changed incompatibly all the time. Early adopters ran gofix to mechanically patch their code after each weekly snapshot. Then Go 1 froze the language, and there was nothing left for gofix to patch.…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town