Skip to content

Use SOURCE retention for @CRuby - #9812

Merged
headius merged 1 commit into
jruby:masterfrom
zev:cruby-source-retention
Oct 17, 2026
Merged

headius merged 1 commit into
jruby:masterfrom
zev:cruby-source-retention

Conversation

@zev

@zev zev commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #9804. kares suggested RetentionPolicy.SOURCE for @CRuby, and headius agreed: nothing reads the annotation at runtime yet, and keeping it costs about 17k in lib/jruby.jar.

  • @CRuby and its @CRuby.List container both move from RUNTIME to SOURCE.
  • The Javadoc now says why, and that it can go back to RUNTIME if a tool needs to read it from a live JRuby.

Checked that nothing in core, tool, spec or test reads it reflectively. A class using a repeated @CRuby compiles and no longer has a RuntimeVisibleAnnotations entry.

🤖 Generated with Claude Code

Nothing reads @cruby at runtime, and RUNTIME retention adds about 17k to
lib/jruby.jar. Agreed on jruby#9804:
jruby#9804 (comment)
jruby#9804 (comment)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zev

zev commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@headius @kares this switches @CRuby to SOURCE retention, as agreed on #9804. It targets master, where the annotation already lives, so it can merge before or after #9804.

@headius
headius merged commit b73d743 into jruby:master Oct 17, 2026
135 checks passed
@headius headius added this to the JRuby 10.1.3.0 milestone Oct 17, 2026
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.

2 participants