Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate away from cat19 method in JRuby #83

Closed
headius opened this issue Mar 12, 2024 · 3 comments
Closed

Migrate away from cat19 method in JRuby #83

headius opened this issue Mar 12, 2024 · 3 comments

Comments

@headius
Copy link
Contributor

headius commented Mar 12, 2024

JRuby versions prior to 10 shipped with RubyString encoding- and coderange-aware concatenation logic in the unfortunately named cat19 method. We are deprecating that method in JRuby 10 to be removed in a subsequent version, replacing it with more descriptive names that do not reference a specific version of Ruby.

StringIO will need to migrate to the newer versions. We will be applying some of the same renaming to JRuby 9.4 releases soon, to allow migrating before JRuby 10, but it's likely that at least one full major-release cycle will have to pass before we can remove the methods.

I will coordinate making appropriate changes here and in the 9.4 and 10.x branches of JRuby.

See jruby/jruby#8149 for the removal PR.

headius added a commit to headius/jruby that referenced this issue Mar 12, 2024
StringIO currently still calls one or both of these cat19 methods,
and will need time to migrate away from them. We may not be able
to safely remove these after one major release cycle, so I am
reverting this deletion with extra notes for future evaluation.

The migration of StringIO will be tracked in ruby/stringio#83
and we will be backporting the new names to try to fast-track the
migration in the next year.
headius added a commit to jruby/jruby that referenced this issue Mar 12, 2024
@headius headius changed the title Migrate way from cat19 method in JRuby Migrate away from cat19 method in JRuby Mar 12, 2024
headius added a commit to headius/stringio that referenced this issue Mar 12, 2024
This cannot be merged until JRuby has released a version that
supports it, and should not be released until we have decided how
to transition away from older JRuby versions that do not have this
name.

See ruby#83
@headius
Copy link
Contributor Author

headius commented Mar 12, 2024

I have pushed #84 but it will not pass except for against jruby-head and should not be released until we are comfortable that the new names have been in the wild long enough (or we must modify the logic to try both names via some reflection check or error fallback).

headius added a commit to jruby/jruby that referenced this issue Mar 12, 2024
headius added a commit that referenced this issue Mar 12, 2024
This is safe on both old and new versions of JRuby, using MethodHandle to indirect access to cat19 or its replacement method.

See #83
@headius
Copy link
Contributor Author

headius commented Mar 12, 2024

I modified #84 to use a MethodHandle to indirect access to the replacement method, so it will work on both old and new JRuby. This can be released any time.

@headius headius closed this as completed Mar 12, 2024
@kou
Copy link
Member

kou commented Mar 13, 2024

This can be released any time.

OK!

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

No branches or pull requests

2 participants