Skip to content

Fix active Zig 0.16 Walk map type#4

Merged
EugOT merged 1 commit into
mainfrom
codex/zigdoc-016-main-stability
Jun 18, 2026
Merged

Fix active Zig 0.16 Walk map type#4
EugOT merged 1 commit into
mainfrom
codex/zigdoc-016-main-stability

Conversation

@EugOT

@EugOT EugOT commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix the current active Zig 0.16 build failure in src/Walk.zig.
  • Replace the unavailable std.array_hash_map.String references with std.StringArrayHashMapUnmanaged.
  • Keep the existing .empty initialization and allocator-explicit deinit/put usage intact.

Reproduced failure on origin/main

Active toolchain: zig 0.16.0-dev.3142+5ccfeb926.

origin/main at 88744f5 fails:

  • src/Walk.zig:20:34: root source file struct 'array_hash_map' has no member named 'String'
  • stdlib check confirms array_hash_map.String is absent, while std.StringArrayHashMapUnmanaged exists.

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.
  • nix flake check --no-build: passed for aarch64-darwin outputs.
  • git diff --check: passed.

E2E

Installed zigdoc into /private/tmp/zigdoc-e2e.ibPyBr/prefix and tested:

  • zigdoc --help.
  • zigdoc std.ArrayList.
  • zigdoc std.Io.File.
  • zigdoc std.process.Init.
  • zigdoc --dump-imports.
  • zigdoc @init in a fresh temp project.
  • Generated project: zig build test --summary all, zig build --summary all, zig build run --summary all.

Notes

  • Repo exposes install/run/test/fmt/lint; no project docs or fuzz build steps are exposed.
  • observation-stamp was attempted before commit, but the helper rejects this repo as non-chezmoi.

Copilot AI review requested due to automatic review settings June 18, 2026 18:32
@EugOT

EugOT commented Jun 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 574d6e5a-9b6b-4386-a4b5-4107cbcbeb5f

📥 Commits

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

📒 Files selected for processing (1)
  • src/Walk.zig
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • EugOT/dotfiles (manual)

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Updated internal data structures to improve efficiency and performance.

Walkthrough

Two global variables in Walk.zig, files and modules, have their declared types changed from std.array_hash_map.String(...) to std.StringArrayHashMapUnmanaged(...). Initialization remains .empty and no other declarations are modified.

Changes

Walk Map Type Update

Layer / File(s) Summary
Global map type change
src/Walk.zig
files and modules are redeclared as std.StringArrayHashMapUnmanaged(File) and std.StringArrayHashMapUnmanaged(File.Index) respectively, replacing the std.array_hash_map.String(...) aliases.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • EugOT/zigdoc#1: Modifies the same pub var files and pub var modules declarations in src/Walk.zig, making it a direct predecessor to this type change.

Poem

🐇 Hippity-hop through the hash map maze,
Unmanaged is now the preferred phrase!
Old aliases fade, new types take flight,
files and modules now feel just right.
A tidy refactor, a bunny's delight! 🗂️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing a Zig 0.16 build failure by updating the Walk.zig map type declarations.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the build failure fix, the specific type replacements, validation steps, and testing results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/zigdoc-016-main-stability

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

@coderabbitai

coderabbitai Bot commented Jun 18, 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

This PR fixes a Zig 0.16 build break in src/Walk.zig by replacing the removed std.array_hash_map.String(...) alias with the supported std.StringArrayHashMapUnmanaged(...), preserving the existing .empty initialization and allocator-explicit deinit/put usage patterns used across the codebase.

Changes:

  • Replace std.array_hash_map.String(File) with std.StringArrayHashMapUnmanaged(File) for Walk.files.
  • Replace std.array_hash_map.String(File.Index) with std.StringArrayHashMapUnmanaged(File.Index) for Walk.modules.

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

@EugOT

EugOT commented Jun 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 18, 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.

@kilo-code-bot

kilo-code-bot Bot commented Jun 18, 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 file)
  • src/Walk.zig

Reviewed by nex-n2-pro:free · 703,634 tokens

@EugOT EugOT merged commit 13a3702 into main Jun 18, 2026
3 checks passed
@EugOT EugOT deleted the codex/zigdoc-016-main-stability branch June 18, 2026 19:07
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