Migrate project from zig 0.15.2 to 0.16 #29
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/zig-0.16"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
0.16.0 removed refAllDeclsRecursive outright, leaving only the shallow refAllDecls; without a recursive replacement most nested-module tests silently stop being discovered and run. Added one in api/root.zig and pointed every per-module `test { ... }` block that used to call the std version at it (platform modules collapse onto api's root test since their declarations are already reachable from there).std.http.Client's connect error set dropped and renamed several variants in 0.16.0 (DNS/socket errors got split out, a few merged into others), so NetClient.fetch's error-mapping switch needed its arms updated to match. Also: ArrayList's unmanaged struct no longer has field defaults compatible with `= .{}`, so CookieJar.init needed `.empty` instead.`catch |err| switch (err) { explicit_tag => ..., inline else => |e| return e }` stopped narrowing the inline-else capture to exclude already-handled tags under 0.16.0, breaking error-set inference at every such call site. Switched the catch-all arms to plain `else` (or, where only a single variant could still reach it, an explicit arm) so the resulting error sets stay exact.Config.init/ConfigRaw.loadFromFile/finalize, updateSubmitConfigCreatingFile and writeSampleConfig all move their filesystem calls onto std.Io.Dir/File and gain an io: std.Io parameter; Account.getCredentials follows for evalPassCmd. shell.zig's XDG lookups move off the removed std.process.getEnvVarOwned onto an explicit std.process.Environ.Map (sourced from init.environ_map), and its evalCmd/runHook process-running helpers move from std.process.Child.{init,run} onto std.process.{run,spawn}, following Child.Term's variant renames (.Exited -> .exited etc.) in the exit-status switch.WIP: Migrate project from zig 0.15.2 to 0.16to Migrate project from zig 0.15.2 to 0.16Most changes were rather mechanical, but I consider this 0.15.2->0.16.0 migration as a net positive.