5 ms·
As a hobby Zig developer, it's a bummer to see a breaking change in something so fundamental, but I get that's what I accept when building on a pre-1.0 language
by mtlynch 1y ago
As a hobby Zig developer, it's a bummer to see a breaking change in something so fundamental, but I get that's what I accept when building on a pre-1.0 language.
I hope that the Zig team invests more into helping with migration than they have in the past. My experience for past breaking changes is that downstream developers got left in the cold without clear guidance about how to fix breaking changes.
In Zig 0.12.0 (released just a year ago), there were a lot of breaking changes to the build system that the release notes didn't explain at all. To see what I mean, look at the changes I had to make[0] in a Zig 0.11.0 project and then search the release notes[1] for guidance on those changes. Most of the breaking changes aren't even mentioned, much less explained how to migrate from 0.11.0 to 0.12.0.
>Some of you may die, but that is a sacrifice I am willing to make.
>-Lord Farquaad
[0] https://github.com/mtlynch/zenith/pull/90/files#diff-f87bb3596894756629bc39d595fb18d479dc4edf168d93a911cadcb060f10fcc https://github.com/mtlynch/zenith/pull/90/files#diff-f87bb35...
[1] https://ziglang.org/download/0.12.0/release-notes.html https://ziglang.org/download/0.12.0/release-notes.html
- AndyKelley 1y agoI'm definitely looking at the example set by hare with interest[0]. Also unironically love Shrek. I once hosted a viewing party of Shrek Retold[1] in my tiny NYC apartment :D [0] https://harelang.org/blog/2025-06-11-hare-update/ https://harelang.org/blog/2025-06-11-hare-update/ [1] https://www.youtube.com/watch?v=pM70TROZQsI https://www.youtube.com/watch?v=pM70TROZQsI
- mtlynch 1y agoGood to hear! (on all fronts) An automated tool would be great, but even good documentation with examples of before vs. after code snippets would go a long way.
- thayne 1y agoThis is why I'm surprised when production projects, like bun, choose to use zig. I don't think the language itself is a bad choice (although I do disagree qith some of the design decisions), but having to make substantial changes when there are breaking changes like this because the language is pre-1.0 every so often in a large code base isn't something I would want to deal with.
- throwawaymaths 1y agomaybe... it's got some really good things going for it that are worth the pain.
- beders 1y agoZig just caught up with the practice that runs rampant in JavaScript land ;)
- toastercat 1y agothis comparison doesn't really make sense since JS as a language keeps a lot of old baggage to maintain backwards compatibility.
- flohofwoe 1y agoIn reality it makes little difference whether source code needs to be fixed because of a breaking language or dependency update. Even in C/C++ I need to go over my code whenever I update to a new compiler version because of new warnings.
- pjmlp 1y agoAnd that is why when no one pays the budget for doing tooling upgrades in big corps, the tooling never gets updated.
- 8n4vidtmkvmk 1y agoIt might be nice if language and library authors at least included a really good prompt detailing all the required changes so an LLM can take a first pass at fixing everything. Even better if it can be done with a deterministic codemod, but a prompt is easier to write.
- HumanOstrich 1y agoShoehorning AI/LLMs into every possible thing in existence is counterproductive and wouldn't help in this situation.
- 8n4vidtmkvmk 1y agoI was hesitant to post it, but migrations are one of the good use cases IMO. They're very mechanical and easy for LLM to follow.
- Szpadel 1y agoI never wrote single line of zig code, but I follow it as an interesting language, so I might be missing something fundamental. I agree that this looks extremely breaking, and feel like providing no compatibility layer fragments community, especially when you might have some unmaintained dependency somewhere that will never be updated. there were similar situations when in rust some core libraries decided to alter its interfaces. but I believe rust approach with editions is brilliant and could be adapter to other languages like zig.
- baranul 1y agoComes with the territory for any pre 1.0 language. What is amazing is that some people will use or critique a language in alpha or beta, then act shocked that they ran into issues.