fix: update build.zig for new std.ArrayList API#526
Open
lee101 wants to merge 2 commits intoneurocyte:masterfrom
Open
fix: update build.zig for new std.ArrayList API#526lee101 wants to merge 2 commits intoneurocyte:masterfrom
lee101 wants to merge 2 commits intoneurocyte:masterfrom
Conversation
Replace .writer() pattern with direct *std.ArrayList and .print() method calls to support newer zig versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
hi just bumping to support zig 0.16.0-dev thx (one more commit coming) |
neurocyte
requested changes
Mar 2, 2026
| b: *std.Build, | ||
| target: std.Build.ResolvedTarget, | ||
| writer: anytype, | ||
| out: *std.ArrayList(u8), |
Owner
There was a problem hiding this comment.
This is not the right fix. The gen_* functions should keep taking a writer, but it should be changed to a concrete std.Io.Writer
And the ArrayList that is written to should be changed into a std.Io.Writer.Allocating
Migrate from removed/renamed APIs: std.io -> std.Io, ArrayList.writer() -> ArrayList.print(), fixedBufferStream -> Io.Writer.fixed, File.readToEndAlloc -> reader().interface.allocRemaining, std.fmt.Formatter -> inline struct, MemoryAccessor removal, and generic Writer/BufferedWriter type removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
Where does this get us? Fully building with the latest zig? What about all the dependencies? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
std.ArrayList.writer()pattern with direct*std.ArrayListparameters and.print()method calls inbuild.ziggen_versionandgen_version_infofunction signatures accordinglyTest plan
zig buildcompiles successfully with the target zig version🤖 Generated with Claude Code