Skip to content

Comments

Upgrade zig 0.15.2#1

Merged
tammoippen merged 12 commits intomasterfrom
upgrade-zig-0.15.2
Feb 23, 2026
Merged

Upgrade zig 0.15.2#1
tammoippen merged 12 commits intomasterfrom
upgrade-zig-0.15.2

Conversation

@tammoippen
Copy link
Owner

@tammoippen tammoippen commented Feb 7, 2026

No description provided.

tammoippen and others added 12 commits February 7, 2026 11:10
- Replace addStaticLibrary/addSharedLibrary with addLibrary
- Add linkage parameter (.static/.dynamic) to library definitions
- Update test filter to be set on test object instead of in options

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change ArrayList.init(allocator) to .{} syntax
- Update deinit() to deinit(allocator) with allocator parameter
- Update append() to append(allocator, item)
- Update appendNTimes() to appendNTimes(allocator, value, n)
- Update writer() to writer(allocator)
- Update Histogram.deinit signature to include allocator parameter

These changes reflect the Zig 0.15.2 ArrayList API where the allocator
is passed to each method rather than stored in the struct.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change {} to {any} for types with custom format methods
- Use {any:width} syntax for custom formatters with options
- Update test code to use {any} instead of {s} for Dots types

Zig 0.15.2 requires explicit format specifiers when printing types
that implement custom format methods. Using {any} calls the format
method, while bare {} is now ambiguous and rejected.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace std.io.getStdOut().isTty() with std.posix.isatty(std.posix.STDOUT_FILENO)

In Zig 0.15.2, the I/O module was restructured and getStdOut() was
removed. The isatty check is now available through the posix module.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change format method signatures from (self, fmt, options, writer) to (self, writer)
- Update all format specifiers from {any} to {f} to call custom format methods
- Replace writeByteNTimes with splatByteAll (new API in 0.15.2)
- Add HistogramFormatter wrapper to support custom widths with {f} specifier
- Update tests to use {f} format specifier and withWidth() helper

In Zig 0.15.2, the format system changed:
- {f} calls the format method with simplified (self, writer) signature
- {any} bypasses custom formatters and prints struct fields
- Format methods no longer receive fmt/options parameters

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change build.zig.zon to use local path instead of GitHub URL
- Update build.zig for Zig 0.15.2 build API
- Use addModule with root_module pattern for executables
- Examples now reference parent directory for plotille library

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace std.io.getStdOut() with std.fs.File.stdout()
- Replace std.io.getStdIn() with std.fs.File.stdin()
- Update writer API to use .writer(&.{}) and .interface
- Update ArrayList.init() to .{} syntax
- Update ArrayList.deinit() to take allocator parameter
- Update ArrayList.append() to take allocator parameter
- Replace readAllAlloc() with readToEndAlloc()
- Update json.stringify() to use json.fmt()
- Change format specifiers from {} to {f} for custom formatters

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use std.fs.File.stdout().handle instead of std.posix.STDOUT_FILENO
to get the actual file descriptor/handle. On Windows, STDOUT_FILENO
is a comptime_int but isatty expects a handle type (*anyopaque).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
On Windows, Zig names the static library 'plotille.lib' rather than
'libplotille.a'. Detect OS via the Windows_NT environment variable and
use the correct path in the c-examples build target.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@tammoippen tammoippen marked this pull request as ready for review February 23, 2026 14:33
@tammoippen tammoippen merged commit b1b8140 into master Feb 23, 2026
4 checks passed
@tammoippen tammoippen deleted the upgrade-zig-0.15.2 branch February 23, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant