Skip to content

fix(walk): migrate deprecated Unmanaged map aliases to canonical 0.16 spellings#6

Merged
EugOT merged 1 commit into
mainfrom
fix/walk-0.16-deprecated-stringmap
Jun 20, 2026
Merged

fix(walk): migrate deprecated Unmanaged map aliases to canonical 0.16 spellings#6
EugOT merged 1 commit into
mainfrom
fix/walk-0.16-deprecated-stringmap

Conversation

@EugOT

@EugOT EugOT commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

main (HEAD 13a3702) fails its own quality gate. The genuine, gate-breaking regression: src/Walk.zig uses the deprecated std.StringArrayHashMapUnmanaged / std.AutoArrayHashMapUnmanaged aliases, which ziglint flags as Z011. Because build.zig:98 wires the lint step into test_step, zig build test exits 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

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

9 insertions, 9 deletions, src/Walk.zig only. No behavior change.

Reproduced regression (before)

$ rm -rf .zig-cache && mise x zig@0.16 -- zig build test --summary all
Z011: src/Walk.zig:20: 'StringArrayHashMapUnmanaged' is deprecated: Deprecated; use `array_hash_map.String`.
Z011: src/Walk.zig:22: 'StringArrayHashMapUnmanaged' is deprecated: Deprecated; use `array_hash_map.String`.
Build Summary: 10/13 steps succeeded (1 failed); 15/15 tests passed   # EXIT 1

Validation (after)

  • 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
  • Type-identity probe (active 0.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/Auto do not exist in std.array_hash_map; will cause compilation failures." This is incorrect for the active toolchain and was rejected with evidence:

  • Live stdlib: array_hash_map.zig:15 pub fn Auto(...), :20 pub 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.
  • Decisive: the build/test gate passes with this change (it would not compile if the types were missing).

Reverting per the finding would reintroduce the gate-breaking Z011 deprecation.

Notes

… 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.
Copilot AI review requested due to automatic review settings June 20, 2026 11:53
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EugOT, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 98b27c8b-3e2a-4ca8-a0a1-53db51c35808

📥 Commits

Reviewing files that changed from the base of the PR and between 279d7e7 and d93696c.

📒 Files selected for processing (1)
  • src/Walk.zig
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/walk-0.16-deprecated-stringmap

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@EugOT EugOT merged commit 50b3edd into main Jun 20, 2026
1 of 2 checks passed
@EugOT EugOT deleted the fix/walk-0.16-deprecated-stringmap branch June 20, 2026 11:53
@kilo-code-bot

kilo-code-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

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 array_hash_map forms. Zero fluff, zero bugs, just clean-up.

Files Reviewed (1 file)
  • src/Walk.zig - 0 issues

Reviewed by laguna-m.1-20260312:free · Input: 497.8K · Output: 4.8K · Cached: 446.5K

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.

2 participants