Skip to content

Replace the deprecated Zig calls left in fx - #2049

Draft
fazxes wants to merge 2 commits into
mainfrom
fazxes/zig-deprecated-calls
Draft

fazxes wants to merge 2 commits into
mainfrom
fazxes/zig-deprecated-calls

Conversation

@fazxes

@fazxes fazxes commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the 21 remaining calls to declarations that Zig 0.17 deprecates, in 13 files. AGENTS.md says fx does not use them, and they had grown back.
  • std.fmt.allocPrint becomes Allocator.print, std.fmt.bufPrint becomes std.mem.print, std.mem.indexOf becomes std.mem.find, std.StaticBitSet becomes std.bit_set.Static, and std.StringArrayHashMapUnmanaged becomes std.array_hash_map.String. Each is the declaration the old name forwards to, so behavior does not change.
  • The one std.mem.copyForwards in transcript_window_shell.zig becomes @memmove between slices of the same length (items[0..rest.len] and rest).

Testing

  • python3 .fx/skills/zig/scripts/check_deprecated.py src: 0 deprecated, down from 21.
  • zig fmt --check src/: clean.
  • With Zig 0.17.1 in a Linux sandbox: zig build passes, and zig build test fails only the sandbox's known read-only and permission tests, the same set as on main. None is in a changed file.

@fazxes fazxes added the type: maintenance Changes internal tooling, dependencies, CI, or implementation structure label Nov 16, 2026
Twenty calls in twelve files still used declarations Zig 0.17
deprecates, which AGENTS.md says fx does not use: std.fmt.allocPrint and
bufPrint, std.mem.indexOf, std.StaticBitSet, and std.mem.copyForwards.
Each is now the declaration it forwards to (Allocator.print,
std.mem.print, std.mem.find, std.bit_set.Static), and the one
copyForwards is a @memmove between slices of the same length.
capture_retention.zig started using std.StringArrayHashMapUnmanaged,
which Zig 0.17 deprecates as an alias of std.array_hash_map.String.
Use the name it forwards to.
@fazxes
fazxes force-pushed the fazxes/zig-deprecated-calls branch from b926eb2 to c61f45c Compare November 22, 2026 20:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Changes internal tooling, dependencies, CI, or implementation structure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant