fix(walk): migrate deprecated Unmanaged map aliases to canonical 0.16 spellings#6
Conversation
… spellings WHY: `zig build test` failed its own quality gate on main (HEAD 13a3702). ziglint Z011 flagged `src/Walk.zig:20` and `:22` for using the DEPRECATED `std.StringArrayHashMapUnmanaged` alias; because build.zig wires the lint step into test_step (build.zig:98), the deprecation findings made `zig build test` exit 1 (10/13 steps). Reproduced cold-cache, twice. WHAT: Replace all 9 deprecated container/struct map declarations in Walk.zig with their canonical, non-deprecated equivalents (byte-for-byte the same types per std.zig:38-41): std.StringArrayHashMapUnmanaged(V) -> std.array_hash_map.String(V) (lines 20, 22, 579, 580) std.AutoArrayHashMapUnmanaged(K, V) -> std.array_hash_map.Auto(K, V) (lines 76, 78, 80, 82, 86) IMPACT: Only src/Walk.zig type spellings change. No behavior change — the canonical forms are the exact targets the deprecated aliases point to (verified by type-identity probe: `String(V) == StringArrayHashMapUnmanaged(V)`, `Auto(K,V) == AutoArrayHashMapUnmanaged(K,V)`, both true under 0.16.0-dev.3142). VALIDATION: - zig build test --summary all: 13/13 steps, 15/15 tests, lint + fmt success, EXIT 0. - zig build --summary all: 7/7 steps, EXIT 0. - Standalone probe compiled+ran proving array_hash_map.String/Auto exist, work, and are identical to the deprecated aliases. - CodeRabbit local review raised 1 "critical" claiming these types don't exist; rejected as a FALSE POSITIVE — contradicted by the live stdlib (array_hash_map.zig:15,20), the type-identity probe, and the passing build. Reverting would reintroduce the gate-breaking Z011 deprecation.
|
Warning Review limit reached
More reviews will be available in 6 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — this is a surgical deprecation fix that migrates exactly what it says on the tin: 9 deprecated type aliases to their canonical Files Reviewed (1 file)
Reviewed by laguna-m.1-20260312:free · Input: 497.8K · Output: 4.8K · Cached: 446.5K |
Summary
main(HEAD13a3702) fails its own quality gate. The genuine, gate-breaking regression:src/Walk.ziguses the deprecatedstd.StringArrayHashMapUnmanaged/std.AutoArrayHashMapUnmanagedaliases, which ziglint flags asZ011. Becausebuild.zig:98wires the lint step intotest_step,zig build testexits 1.This PR migrates all 9 declarations to their canonical, non-deprecated equivalents — byte-for-byte the same types per
std.zig:38-41.Change
9 insertions, 9 deletions,
src/Walk.zigonly. No behavior change.Reproduced regression (before)
Validation (after)
zig build test --summary all: 13/13 steps, 15/15 tests, lint + fmt success, EXIT 0zig build --summary all: 7/7 steps, EXIT 00.16.0-dev.3142):array_hash_map.String(V) == StringArrayHashMapUnmanaged(V)→true;array_hash_map.Auto(K,V) == AutoArrayHashMapUnmanaged(K,V)→true. Both canonical types compile, run, and store/retrieve correctly.CodeRabbit review — 1 finding, rejected as FALSE POSITIVE
CodeRabbit CLI (local) raised 1 "critical": "
String/Autodo not exist instd.array_hash_map; will cause compilation failures." This is incorrect for the active toolchain and was rejected with evidence:array_hash_map.zig:15pub fn Auto(...),:20pub fn String(...)— they exist.std.zig:38-41: the deprecated aliases point AT these (AutoArrayHashMapUnmanaged = array_hash_map.Auto). CodeRabbit had the deprecation direction backwards.Reverting per the finding would reintroduce the gate-breaking
Z011deprecation.Notes
rockorager/zigdocPRs feat: Zig 0.16 full migration (build + src/ + Walk + main + ziglint dep) #1/Fix Zig 0.16 quality gates #2/Fix Zig 0.16 Walk string maps #3 were triaged: all skip — the fork already supersedes them with more modern 0.16 implementations (no write access upstream regardless).