fix(lint): add missing visit methods to LateLintVisitor#14276
fix(lint): add missing visit methods to LateLintVisitor#14276figtracer merged 5 commits intofoundry-rs:masterfrom
Conversation
There was a problem hiding this comment.
sgtm, thanks
I just have potentially a concern about the old deprecated hooks being silently ignored.
A solution may be either:
- Dispatch both old and new hooks
- or drop simply the deprecated shims entirely
(breaking change, but clearer)
Pending another review
|
@mablr Done, thanks for your review! |
mablr
left a comment
There was a problem hiding this comment.
Hi @solanaXpeter, sorry my prev review was misleading, after looking a bit deeper, I believe the second solution is simpler. I think the hooks can be simply replaced with the corrected by-value signatures. No deprecation needed, smaller diff.
|
@mablr Done. I replaced the nested hooks with the by-value signatures directly and trimmed the extra compatibility layer. |
figtracer
left a comment
There was a problem hiding this comment.
can we add tests for this ?
|
@figtracer Added test, please re-check, thanks! |
mablr
left a comment
There was a problem hiding this comment.
sgtm
please @figtracer could you also recheck?
figtracer
left a comment
There was a problem hiding this comment.
think its good for now this is already an improvement
Motivation
LateLintPassexposes nested item/contract/function/var, modifier, and call-args hooks, butLateLintVisitoronly dispatched a subset of them.This left
check_modifierandcheck_call_argsunreachable, and the legacy nested-ID hooks no longer matched the currentsolar::hir::VisitAPI.Solution
Add the missing visitor dispatch for nested item/contract/function/var, modifier, and call args in
LateLintVisitor.Keep the original borrowed
check_nested_*hooks as deprecated compatibility shims, and add*_idhooks that receive IDs by value so the late lint API stays compatible while matching the currentsolarvisitor semantics.PR Checklist