Repository navigation
Update Caffeine JMH benchmark to 3.3.0 - #1887
Conversation
Caffeine 3.3.0 compiles cleanly with NullAway master, so this moves the Caffeine JMH benchmark to it and re-enables `BenchmarkCompilationTest.testCaffeine`, which has been ignored since apache#1623. Besides the version bump: - `WindowClimber.java` is new in 3.3.0 and is referenced from `BoundedLocalCache`, so it is added to the benchmark's source list. It is the only source file added since 3.2.3. - The benchmark now passes `-XepOpt:NullAway:JSpecifyExperimental=true`, which is what Caffeine's own build uses. 3.3.0 declares `@Nullable Object[] toArray()` on the key and value views in `UnboundedLocalCache`, and without the JSpecify JDK models NullAway reports these as invalid overrides of `AbstractCollection.toArray()`. Enabling `JSpecifyJDKModels` alone is not enough: it leads to errors in `compute` and `handle` lambdas, which the wildcard handling in `JSpecifyExperimental` resolves. Because of the new flag, benchmark timings from before and after this change are not directly comparable. Fixes apache#1629
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: uber/NullAway/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe JMH build now uses Caffeine 3.3.0 for source and binary dependencies. Its classpath exclusion filter matches that version. Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The benchmark now compiles against Caffeine 3.3.0 with the required source and annotations support, and its compilation test is enabled. No actionable merge-blocking risk is evidenced. 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 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 #1887 +/- ##
=========================================
Coverage 87.68% 87.68%
Complexity 3458 3458
=========================================
Files 110 110
Lines 11509 11509
Branches 2366 2366
=========================================
Hits 10092 10092
Misses 652 652
Partials 765 765 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Caffeine 3.3.0 compiles cleanly with NullAway master, so this moves the Caffeine JMH benchmark to it and re-enables
BenchmarkCompilationTest.testCaffeine, which has been ignored since #1623.Besides the version bump:
WindowClimber.javais new in 3.3.0 and is referenced fromBoundedLocalCache, so it is added to the benchmark's source list. It is the only source file added since 3.2.3.-XepOpt:NullAway:JSpecifyExperimental=true, which is what Caffeine's own build uses. 3.3.0 declares@Nullable Object[] toArray()on the key and value views inUnboundedLocalCache, and without the JSpecify JDK models NullAway reports these as invalid overrides ofAbstractCollection.toArray(). EnablingJSpecifyJDKModelsalone is not enough: it leads to errors incomputeandhandlelambdas, which the wildcard handling inJSpecifyExperimentalresolves.Because of the new flag, benchmark timings from before and after this change are not directly comparable.
Fixes #1629
Disclosure: I used AI tooling for the grunt and mechanical work here — boilerplate, test scaffolding, and running the test matrix. The approach and direction were mine, and I reviewed the result before submitting.
Summary by CodeRabbit
Tests
Chores