NullAway icon indicating copy to clipboard operation
NullAway copied to clipboard

Update Caffeine JMH benchmark once it builds again with NullAway

Open msridhar opened this issue 4 months ago • 6 comments

After #1623 our Caffeine JMH benchmark fails to compile. We should get fixes into Caffeine, and then once they cut a new release, update our benchmark to use that release.

msridhar avatar Jul 15 '26 23:07 msridhar

Thanks @msridhar for opening this follow-up issue.

My understanding is that #1623 exposed valid NullAway warnings in the Caffeine JMH benchmark, so the first step is to fix the affected code upstream in Caffeine and then update NullAway’s benchmark dependency once Caffeine cuts a release.

I can take a look at the Caffeine failures and see whether there is a small upstream fix I can help with.

codingkiddo avatar Jul 16 '26 02:07 codingkiddo

@codingkiddo I wouldn't worry about the upstream failures. Probably they will get fixed quickly after we cut a new NullAway release. The main work here will be to update our benchmark to use the subsequent Caffeine release.

msridhar avatar Jul 16 '26 02:07 msridhar

@codingkiddo I wouldn't worry about the upstream failures. Probably they will get fixed quickly after we cut a new NullAway release. The main work here will be to update our benchmark to use the subsequent Caffeine release.

Thanks for clarifying @msridhar. That makes sense.

codingkiddo avatar Jul 16 '26 08:07 codingkiddo

Hi — I'd like to take a shot at this. Looks like it was broken by #1623 (modeling Map.remove(Object) as @Nullable), which landed in the same commit that added the @Ignore here. I dug into the pinned Caffeine 3.2.3 source and found at least one clear new violation in LocalAsyncCache.AsMapView.remove(Object) (returns cache().remove(key) directly from a method with a non-@Nullable CompletableFuture return type). Planning to run the ignored test to see the full error list and fix by trimming SOURCE_FILE_NAMES if that's sufficient — matches the existing rationale for why that list is already a curated subset. Let me know if this is already spoken for!

abdeltaehass avatar Aug 20 '26 18:08 abdeltaehass

@abdeltaehass I'd hold off on this one. There are other Caffeine-related issues with build errors on the master branch. So even if you fix these remove issues there will likely be other problems. It'll probably take a bit of time to get Caffeine back into a consistent state with NullAway's master branch. Even then, we can ask if they can cut a new release rather than trimming the source files.

msridhar avatar Aug 20 '26 19:08 msridhar

Caffeine 3.3.0 has been released. This could be a good time to look into this one and try out the new release.

msridhar avatar Sep 21 '26 18:09 msridhar