Repository navigation
Fix the OWritesBench compilation on Scala 2 - #1485
Merged
mergify[bot] merged 1 commit intoOct 7, 2026
Merged
Conversation
Writes.genericMapWrites and Writes.keyMapWrites were called without type arguments, which fails with a diverging implicit expansion on Scala 2.12 and 2.13, so the benchmarks project did not compile there (Scala 3 was fine). Pass the type arguments explicitly. Also format the file with scalafmt; it had not been formatted since it was added, as validateCode does not check the benchmarks project.
cchantep
approved these changes
Oct 7, 2026
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 9 minutes 21 seconds in the queue, including 8 minutes 53 seconds running CI. Required conditions to merge
|
7 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Purpose
On
main, thebenchmarksproject does not compile on Scala 2.12 or 2.13:and the same at line 64 for
Writes.keyMapWrites.writes(scoreMap). Scala 3.3 compiles it. Because the defaultscalaVersionis 2.13,benchmarks / Jmh / runfails for every benchmark, not just this one.This passes the type arguments explicitly:
genericMapWrites[String, Map]andkeyMapWrites[Int, Double, Map].The file is also reformatted with scalafmt. It had not been formatted since it was added, because
validateCodedoes not check thebenchmarksproject (which is also why CI did not catch the compile error).Checked locally (JDK 17):
+benchmarks/Jmh/compilepasses on 2.12.21, 2.13.18 and 3.3.8, andbenchmarks/scalafmtCheckAllpasses. Onmain,benchmarks/compilefails on 2.12.21 and 2.13.18 and passes on 3.3.8.References
Found while benchmarking
appendfor the review of #1482 (#1482 (comment)).OWritesBenchwas added in #1430.AI disclosure: I directed and verified this work; Claude Code (Claude Opus) assisted with the investigation, the patch and this description.
🤖 Generated with Claude Code