Change how recursive calls to dataflow are detected#1374
Conversation
| // the generic invocation is either a regular parameter to the parent call, or the | ||
| // receiver expression | ||
| AtomicReference<Type> formalParamTypeRef = new AtomicReference<>(); | ||
| AtomicReference<@Nullable Type> formalParamTypeRef = new AtomicReference<>(); |
There was a problem hiding this comment.
this is a drive-by unrelated fix
WalkthroughAdds public isRunning(TreePath, Context) to AccessPathNullnessAnalysis and isRunning(TreePath, Context, AccessPathNullnessPropagation) to DataFlow to allow querying whether a dataflow analysis run is active for a given path and context. Refactors GenericsChecks to remove the boolean calledFromDataflow parameter from several methods and to use AccessPathNullnessAnalysis for nullness refinement; updates call sites and minor type annotations accordingly. Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-08-28T04:54:20.953ZApplied to files:
📚 Learning: 2025-08-29T18:41:43.584ZApplied to files:
🧬 Code graph analysis (1)nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (4)
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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1374 +/- ##
============================================
- Coverage 88.47% 88.47% -0.01%
- Complexity 2616 2619 +3
============================================
Files 98 98
Lines 8766 8774 +8
Branches 1749 1750 +1
============================================
+ Hits 7756 7763 +7
Misses 504 504
- Partials 506 507 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Expose a new API to determine if dataflow analysis is currently running for a particular method / lambda / initializer (based on Checker Framework APIs), and call that new API to avoid recursively calling into dataflow. This doesn't change functionality but better prepares us for the fix to #1373.
We retain the
calledFromDataflowparameter to some methods to still ensure that we do not cache inference results when generic method inference is called from the dataflow analysis. But, in some places the parameter is no longer needed and has been removed.Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.