Skip to content

refactor(lint): pass only gcx to late lint hooks - #1376

Merged
DaniPopes merged 1 commit into
mainfrom
refactor/late-lint-pass-gcx
Sep 4, 2026
Merged

refactor(lint): pass only gcx to late lint hooks#1376
DaniPopes merged 1 commit into
mainfrom
refactor/late-lint-pass-gcx

Conversation

@DaniPopes

Copy link
Copy Markdown
Collaborator

Gcx<'hir> already exposes the HIR as gcx.hir, so every LateLintPass hook now receives only the global context: the hooks that took both gcx and hir drop the hir parameter, and the hooks that took only hir take gcx instead, giving the whole trait one uniform shape. LateLintVisitor no longer stores a separate HIR handle and its constructor loses that argument.

This is a breaking change for downstream lint passes (Foundry's lints are being updated alongside in foundry-rs/foundry#16621). Written with AI assistance (Claude Code).

🤖 Generated with Claude Code

DaniPopes added a commit to foundry-rs/foundry that referenced this pull request Sep 4, 2026
Bump Solar to paradigmxyz/solar#1376, whose LateLintPass hooks receive
only the global context, and update every pass accordingly. The bump
also brings the new for-loop lowering that keeps the update statement on
LoopSource::For instead of inside the body, so the loop-walking analyses
now run the update after each completed iteration through the shared
loop_update and loop_stmts helpers, and the lints that reverse-engineered
the old lowering (ecrecover, function-selector-collision,
cache-array-length, enumerable-loop-removal) read it directly.
@DaniPopes
DaniPopes marked this pull request as ready for review September 4, 2026 15:04
@DaniPopes
DaniPopes requested a review from onbjerg as a code owner September 4, 2026 15:04
The HIR is reachable as gcx.hir, so LateLintPass hooks no longer take a
separate hir parameter and LateLintVisitor no longer stores one. Hooks
that only received the HIR now receive the global context instead.
@DaniPopes
DaniPopes force-pushed the refactor/late-lint-pass-gcx branch from 5620a88 to 48ceb7f Compare September 4, 2026 15:06
@DaniPopes
DaniPopes merged commit 8d73a1e into main Sep 4, 2026
18 checks passed
@DaniPopes
DaniPopes deleted the refactor/late-lint-pass-gcx branch September 4, 2026 15:17
DaniPopes added a commit to foundry-rs/foundry that referenced this pull request Sep 4, 2026
Pin the merged paradigmxyz/solar#1376 instead of its branch head.
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.

1 participant