Skip to content

align: sync fork with upstream rockorager Zig 0.16 migration#2

Merged
EugOT merged 7 commits into
mainfrom
align/sync-upstream-0.16
Jun 12, 2026
Merged

align: sync fork with upstream rockorager Zig 0.16 migration#2
EugOT merged 7 commits into
mainfrom
align/sync-upstream-0.16

Conversation

@EugOT

@EugOT EugOT commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Why

EugOT/ziglint had diverged from upstream rockorager/ziglint: 5 commits behind, with a parallel 0.16 migration (#1) whose build.zig.zon still declared minimum_zig_version = "0.15.2". This fork-sync adopts upstream's canonical maintainer migration while preserving EugOT's value-adds, aligning the Zig-code QC.

Adopted from upstream (merged cleanly, non-conflicting)

  • build.zig.zon minimum_zig_version 0.15.2 → 0.16.0 (fixes the stale pin)
  • .github/workflows/ci.yml + release.ymlZig 0.16.0
  • flake.nixzig_0_16

Kept from EugOT on the 8 convergent-migration source conflicts

Both sides migrated the same files to 0.16; EugOT's is equivalent and carries unique value:

  • ModuleGraph.zig sentinel-correct realPathFileAlloc ([:0]const u8 + errdefer) — fixes the "Allocation size N+1 vs free size N" DebugAllocator panic that upstream's un-sentineled form still has.
  • build.zig lint_smoke self-lint gate (runs ziglint on its own source; expectExitCode(1) until residual style findings are cleared) + lint alias.
  • the .agents/.claude/AGENTS.md agentic-QC overlay.

Validation

mise x zig@0.16.0 -- zig build test --summary all7/7 steps succeeded, 274/274 tests passed. The lint_smoke gate runs and reports residual findings (deprecated indexOffind, Z023 param order) as expected via expectExitCode(1); the build still succeeds.

Follow-up (non-blocking)

The residual indexOffind / Z023 param-order findings the self-lint surfaces are a small cleanup that would let the gate move to expectExitCode(0).

rockorager and others added 6 commits April 16, 2026 06:07
Switch runtime and build integration to explicit std.Io and std.process.Init APIs required by Zig 0.16.\n\nReplace removed @Type-based rule config reification with @struct, migrate filesystem and process helpers across config/module/doc-test codepaths, and update test fixtures to the new tmp-dir IO signatures while preserving existing lint behavior.

Amp-Thread-ID: https://ampcode.com/threads/T-019d964a-6031-744f-9b3e-6cf585c43982
Co-authored-by: Amp <amp@ampcode.com>
EugOT/ziglint had diverged: 5 commits behind upstream and carrying a parallel
0.16 migration (#1) whose build.zig.zon still declared minimum_zig_version
"0.15.2". This merges upstream/main to adopt the canonical maintainer migration
while preserving EugOT's value-adds.

Adopted from upstream (non-conflicting, merged cleanly):
- build.zig.zon minimum_zig_version 0.15.2 -> 0.16.0 (fixes the stale pin)
- .github/workflows ci.yml + release.yml -> Zig 0.16.0
- flake.nix -> zig_0_16

Kept from EugOT on the 8 convergent-migration source conflicts (both sides
migrated the same files to 0.16; EugOT's is equivalent AND carries unique value):
- ModuleGraph.zig sentinel-correct realPathFileAlloc ([:0]const u8 + errdefer)
  that fixes the "Allocation size N+1 vs free size N" DebugAllocator panic —
  upstream still uses the un-sentineled form.
- build.zig lint_smoke self-lint gate (runs ziglint on its own source,
  expectExitCode(1) until residual style findings are cleared) + lint alias.
- the .agents/.claude/AGENTS.md agentic-QC overlay.

VALIDATION: mise x zig@0.16.0 -- zig build test --summary all ->
7/7 steps succeeded, 274/274 tests passed. The lint_smoke gate runs and reports
residual findings (deprecated indexOf->find, Z023 param order) as expected via
expectExitCode(1); the build still succeeds.
Copilot AI review requested due to automatic review settings June 12, 2026 11:34
@coderabbitai

coderabbitai Bot commented Jun 12, 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 3 hours, 39 minutes, and 53 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: 72d70d2f-d452-4553-80e9-db914f854a46

📥 Commits

Reviewing files that changed from the base of the PR and between 1060188 and e6bb72f.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • build.zig.zon
  • flake.nix
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch align/sync-upstream-0.16

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.

Pull request overview

Synchronizes this fork with upstream’s Zig 0.16 migration by updating the declared minimum Zig version and aligning CI/release/dev-shell tooling to Zig 0.16.0.

Changes:

  • Bump build.zig.zon minimum_zig_version to 0.16.0.
  • Update GitHub Actions CI and release workflows to install Zig 0.16.0.
  • Update Nix flake devShell to use zig_0_16 / zls_0_16 and refresh the flake lock inputs.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
flake.nix Dev shell now targets Zig/ZLS 0.16.
flake.lock Updates pinned Nix inputs to match the flake changes.
build.zig.zon Raises the minimum Zig version to 0.16.0.
.github/workflows/release.yml Releases build with Zig 0.16.0.
.github/workflows/ci.yml CI builds/tests with Zig 0.16.0.

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

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@kilo-code-bot

kilo-code-bot Bot commented Jun 12, 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.

The checkout version mismatch from the previous review has been fixed - both CI and release workflows now wear matching @v6 jackets. The Zig version bump from 0.15.2 to 0.16.0 is consistent across all files (ci.yml, release.yml, build.zig.zon, flake.nix).

Like a well-oiled assembly line — version numbers are aligned, dependencies are updated, and the only thing missing is the celebratory commit message that says "finally, no more chaos."

📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are.

Files Reviewed (5 files)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • build.zig.zon
  • flake.nix
  • flake.lock (lock file - generated)

Reviewed by laguna-m.1-20260312:free · 397,069 tokens

@EugOT EugOT merged commit e561228 into main Jun 12, 2026
7 checks passed
@EugOT EugOT deleted the align/sync-upstream-0.16 branch June 12, 2026 13:20
EugOT added a commit that referenced this pull request Jun 20, 2026
…rrors (#7)

WHY: A full multi-agent adversarial audit of the fork delta vs upstream
(bfcb30d..b212557, 24 raw findings → 3 confirmed after verification) surfaced
three real, verified defects present at HEAD:
  1. Z029 (redundant @as in struct init) only compared bare-identifier field
     types, so `@as(*u32, ...)`, `@as(?T, ...)`, `@as([N]T, ...)` and
     `@as(a.b.C, ...)` on struct fields were silently skipped — genuine linter
     false negatives (the tool's core job).
  2. lintDirectory's `walker.next(io) catch null` ended traversal silently on a
     permission error / symlink loop, leaving the rest of the tree un-linted
     with no diagnostic.
  3. main's `FileConfig.load(...) catch .{}` swallowed config-discovery errors
     (e.g. an allocation failure joining the search path) without logging.
All three are pre-existing upstream but ship in the fork; this cycle's scope was
the whole fork-vs-upstream delta.

WHAT:
  - Linter.zig: findContainerFieldTypeInTree now returns the field type's raw
    source (Ast.getNodeSource) instead of only `.identifier`. Added getAsTypeText
    (source of an `@as` cast's type node) and typeTextEql (whitespace-insensitive
    compare). checkRedundantAsInStructInit compares source text, so all composite
    field types are handled. getAsTypeName is retained (still used by call-arg /
    array / return / value paths).
  - main.zig: directory-walk errors now print a warning before stopping; config
    load logs the error before falling back to defaults. Both Z026-clean.
  - Added 4 Z029 regression tests (pointer/optional/array detection + a
    different-pointer-type negative case).

IMPACT: src/Linter.zig, src/main.zig. No behavior change for the previously
handled identifier case; new detections are strict (whitespace-normalized exact
type-text match, so different types still don't trigger). Linter now catches a
class of redundant casts it previously missed and no longer fails silently on
unreadable directories/config.

VALIDATION: TDD — the 3 composite-type tests failed (expected 1, found 0) before
the fix and pass after. `zig build test --summary all` => 7/7 steps, 281/281
tests pass, zig fmt clean, self-lint (run exe ziglint) clean. The self-lint gate
also caught an empty `catch {}` in the first draft of fix #2 (Z026), which was
corrected to `try`.
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.

4 participants