Skip to content

re-implement the option to lazy bind Java:: constants#8368

Merged
kares merged 6 commits intojruby:masterfrom
kares:proxy-class-init_final
Oct 18, 2024
Merged

re-implement the option to lazy bind Java:: constants#8368
kares merged 6 commits intojruby:masterfrom
kares:proxy-class-init_final

Conversation

@kares
Copy link
Member

@kares kares commented Oct 10, 2024

this is a second attempt at resolving (#8349) the slight regression introduced at 31f1ed6

the commit is reverted and the -Xji.eager.constants feature is re-implemented more conservatively (without effecting all getProxyClass callers).

also rename and cleaned up the method setting the actual proxy class constant, the tests are a bit futile but should prevent doing a similar getProxyClass refactoring, which would have undesired side effects.

@kares kares changed the title Proxy class init final re-implement the option to lazy set of Java:: constants Oct 10, 2024
@kares kares linked an issue Oct 10, 2024 that may be closed by this pull request
@kares kares added this to the JRuby 9.4.9.0 milestone Oct 10, 2024
@headius
Copy link
Member

headius commented Oct 10, 2024

@kares Are you happy with this one? Definitely a good idea to get this fixed in 9.4.9.0.

@kares
Copy link
Member Author

kares commented Oct 11, 2024

seems to work fine. the pre 9.4.7.0 getProxyClass behavior is restored and -Xji.eager.constants=false should have the same effect (in terms of setting the constant) as the original implementation...

@kares kares changed the title re-implement the option to lazy set of Java:: constants re-implement the option to lazy bind Java:: constants Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

internal proxy class is stored in Ruby land and prints warning

2 participants