Skip to content

feat: add soft-reference compile-time caches#588

Open
ningyang1988 wants to merge 1 commit into
zio:developfrom
ningyang1988:fix/issue-350-soft-cache
Open

feat: add soft-reference compile-time caches#588
ningyang1988 wants to merge 1 commit into
zio:developfrom
ningyang1988:fix/issue-350-soft-cache

Conversation

@ningyang1988

Copy link
Copy Markdown

This PR implements the soft-reference compile-time cache requested in #350 with a small, targeted patch.

What changed

  • Scala 2: wraps compile-time caches for ref, fullDb, and inheritanceDb with SoftReference
  • Scala 3: adds the corresponding soft-reference compile-time caches in TypeInspections
  • Keeps the patch limited to 2 source files only

Validation

  • Scala 3 TagTest: passed
  • Scala 2 TagTest: passed
  • cache disabled check: -Dizumi.reflect.rtti.cache.compile=false still passes TagTest
  • full regression: sbt +clean +test passed (209 tests, 0 failed)

Notes

  • I intentionally did not include unrelated changes
  • I also did not add benchmark claims from weak single-run samples; this PR focuses on requested behavior and regression safety

Closes #350

@CLAassistant

CLAassistant commented Apr 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ningyang1988

Copy link
Copy Markdown
Author

CLA assistant shows that the agreement has already been accepted on my side ('You have agreed to the CLA for zio/izumi-reflect'), but the PR check is still pending as not signed. I also retriggered the recheck link while logged into the same GitHub account that opened this PR. Could you please help re-sync or re-run the CLA check? Thanks!

@ningyang1988 ningyang1988 force-pushed the fix/issue-350-soft-cache branch from 48ec1e0 to 46920a8 Compare April 16, 2026 09:56
@ningyang1988

Copy link
Copy Markdown
Author

Gentle bump — checking if there is anything I can do to help move this PR forward. Happy to address any feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Granular complile-time caches for Scala 2 and 3

2 participants