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
Bind inaccessible methods with informational error output #5823
Comments
Thumbs up on this idea! |
I think this is a great idea but detargetting since we have way more targetted issues than we will solve for 9.3.0.0 already. |
There are libraries that allow us to add opens. We could detect this situation, warn, and then fix it with something like this code: https://github.com/stefan-zobel/wip/blob/master/src/main/java/misc/AddOpens.java or this library: https://github.com/burningwave/core/blob/fb23c1b1e313fd4c6a2d02bf19657c25db785db1/src/main/java/org/burningwave/core/classes/Modules.java#L176 |
Those two examples of adding opens at runtime both require deep reflective access to java.lang classes. In other words, we'd have to open up java.lang in order to add other opens at runtime, and I'm not sure that's something we should be doing, or at least not without deeply considering the implications of having java.lang classes be reflectively mutable by JRuby. |
For #5821 I discovered that we are not properly checking accessibility for methods when setting up their Ruby proxy classes. I have fixed that issue, by providing a JRuby class as the "caller" module, but I believe we need to do a better job helping people open up modules they need for JRuby apps to work.
I propose the following:
I believe the current situation will never scale, since people will see NoMethodError instead of accessibility errors or helpful tips. We have eliminated the JVM's warning but not replaced it with anything of our own. Adding dummy methods would solve this.
The text was updated successfully, but these errors were encountered: