I noticed this issue when trying to print some debug text to the screen. When my code includes a call to sdl3.render.renderDebugTextFormat, the code fails to compile with a message like:
~/.cache/zig/p/sdl3-0.1.6-NmT1Q5sQJgCzT6hLj7WOSrwxE0Qsef1wIkDopbOOFru0/src/render.zig:1304:32: error: root source file struct 'fmt' has no member named 'allocPrintZ'
const msg = try std.fmt.allocPrintZ(allocator, fmt, args);
Context:
constmsg=trystd.fmt.allocPrintZ(allocator,fmt,args);
This happens because Zig 0.15.1 made some changes to the standard library API, including the removal of std.fmt.allocPrintZ in favor of std.fmt.allocPrintSentinel. I believe a simple fix is to replace the previous line with this:
constmsg=trystd.fmt.allocPrintSentinel(allocator,fmt,args,0);
Thanks for your time.
Versions: Zig 0.15.2, zig-sdl3 0.1.6 (also present on master)
Platform: Ubuntu 24.04.3 LTS (via WSL)
I noticed this issue when trying to print some debug text to the screen. When my code includes a call to sdl3.render.renderDebugTextFormat, the code fails to compile with a message like:
```
~/.cache/zig/p/sdl3-0.1.6-NmT1Q5sQJgCzT6hLj7WOSrwxE0Qsef1wIkDopbOOFru0/src/render.zig:1304:32: error: root source file struct 'fmt' has no member named 'allocPrintZ'
const msg = try std.fmt.allocPrintZ(allocator, fmt, args);
```
Context: https://codeberg.org/7Games/zig-sdl3/src/commit/92b83602cdfa59262e73c023df906c78eef73455/src/render.zig#L1556
This happens because Zig 0.15.1 made some changes to the standard library API, including the removal of `std.fmt.allocPrintZ` in favor of [`std.fmt.allocPrintSentinel`](https://ziglang.org/documentation/0.15.2/std/#std.fmt.allocPrintSentinel). I believe a simple fix is to replace the previous line with this:
```zig
const msg = try std.fmt.allocPrintSentinel(allocator, fmt, args, 0);
```
Thanks for your time.
Versions: Zig 0.15.2, zig-sdl3 0.1.6 (also present on master)
Platform: Ubuntu 24.04.3 LTS (via WSL)