Repository navigation
Fix subtle issue with invalid TreePaths - #1681
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1681 +/- ##
=========================================
Coverage 87.71% 87.71%
Complexity 3136 3136
=========================================
Files 109 109
Lines 10612 10614 +2
Branches 2144 2144
=========================================
+ Hits 9308 9310 +2
Misses 626 626
Partials 678 678 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
An AccessPathNullnessAnalysis instance is cached in the javac Context and shared by every compilation unit of the task, so the VisitorState its transfer functions hold belongs to whichever file created the instance. VisitorState.reportMatch() routes a diagnostic through the DescriptionListener in that state, and the listener decides which file the diagnostic is attributed to. An error raised while dataflow was running therefore landed in an unrelated file, at a position past its end, and for a failure that only dataflow raises it was the sole diagnostic of the build. Threading the TreePath through (apache#1680, apache#1681) did not help, since the path was already correct. Refresh the state of both transfer functions whenever AccessPathNullnessAnalysis.instance() hands out the cached instance for a different compilation unit. Fixes apache#1733 This is also what puts the extra report of apache#1725 in an unrelated file. The second half of that issue, the same warning reported twice at the same position, is a separate defect: it reproduces on master within a single compilation unit and is untouched here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fixes #1680
See full diagnosis in #1680 (comment). This is a fix for the crash only; we will do follow-on fixes / cleanups in separate PRs.