Skip to content

Fix Zig 0.16 Walk string maps#3

Closed
EugOT wants to merge 1 commit into
mainfrom
codex/zigdoc-016-merged-safety-fix
Closed

Fix Zig 0.16 Walk string maps#3
EugOT wants to merge 1 commit into
mainfrom
codex/zigdoc-016-merged-safety-fix

Conversation

@EugOT

@EugOT EugOT commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix post-merge Zig 0.16 compile break from removed std.array_hash_map.String alias.
  • Use std.StringArrayHashMapUnmanaged for Walk global string-keyed maps, preserving .empty and allocator-explicit conventions.
  • Follow-up to merged PR Fix Zig 0.16 quality gates #2 after pulling GitHub review state: CodeRabbit approved PR Fix Zig 0.16 quality gates #2, but local active-toolchain validation found this remaining break on merged main.

GitHub review state checked

Validation

  • zig build test --summary all: 13/13 steps succeeded; 15/15 tests passed; fmt and ziglint succeeded.
  • zig build --summary all: 7/7 steps succeeded.
  • git diff --check HEAD~1..HEAD.
  • zig build run -- --help.
  • zig build run -- std.ArrayList.
  • zig build run -- --dump-imports.

Safety

  • Commit hook passed gitleaks, veles-cli, and large-file checks.
  • Pre-push hook passed gitleaks and veles-cli.

Copilot AI review requested due to automatic review settings June 13, 2026 00:06
@coderabbitai

coderabbitai Bot commented Jun 13, 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 13 minutes and 13 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ 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.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

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: d3996c1a-1129-4f0e-b923-83c25510cd63

📥 Commits

Reviewing files that changed from the base of the PR and between 88744f5 and 65b54ed.

📒 Files selected for processing (1)
  • src/Walk.zig
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/zigdoc-016-merged-safety-fix

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

@EugOT

EugOT commented Jun 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

Pull request overview

Fixes a Zig 0.16 compilation break in Walk caused by the removal of std.array_hash_map.String by switching the affected global string-keyed maps to the supported std.StringArrayHashMapUnmanaged type.

Changes:

  • Replace std.array_hash_map.String(File) with std.StringArrayHashMapUnmanaged(File) for the files global map.
  • Replace std.array_hash_map.String(File.Index) with std.StringArrayHashMapUnmanaged(File.Index) for the modules global map.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kilo-code-bot

kilo-code-bot Bot commented Jun 13, 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 — I didn't think clean PRs existed anymore, but here we are.

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

Reviewed by step-3.7-flash-20260528 · 233,351 tokens

@EugOT

EugOT commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

Closing — verified gate-breaking regression

This PR reverts src/Walk.zig lines 20 & 22 from the canonical std.array_hash_map.String(...) back to std.StringArrayHashMapUnmanaged(...). That is a regression, verified empirically against Zig 0.16.0:

Ground truth (active 0.16.0 stdlib): lib/std/std.zig:40-41

/// Deprecated; use `array_hash_map.String`.
pub const StringArrayHashMapUnmanaged = array_hash_map.String;

The two spellings are the same type by alias, but StringArrayHashMapUnmanaged is explicitly annotated Deprecated. main already uses the canonical non-deprecated array_hash_map.String.

Reproduced gate failure — checked out this PR head (65b54ed) into a fresh clone and ran the repo's own quality gate:

$ mise x zig@0.16.0 -- 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
  test transitive failure
  +- lint transitive failure
     +- run exe ziglint failure

zigdoc's build.zig wires the strict ziglint lint step into test_step via expectExitCode(0); the two Z011 deprecated-symbol findings make ziglint exit 1, failing zig build test. main passes the same gate cleanly (13/13 steps, 15/15 tests).

CodeRabbit: the automated check on this PR reported fail — Insufficient usage credits; re-runs via the CLI could not finalize within bound. The verdict here is based on reproduced build evidence, which is authoritative for this repo's own gate.

Closing as a no-fix-needed regression: main is already correct.

@EugOT EugOT closed this Jun 16, 2026
@EugOT EugOT deleted the codex/zigdoc-016-merged-safety-fix branch June 16, 2026 11:51
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