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

Bind inaccessible methods with informational error output #5823

headius opened this issue Aug 9, 2019 · 1 comment


Copy link

commented Aug 9, 2019

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:

  • When a method in a class is not visible and can't be set accessible, bind a dummy method in its place.
  • The dummy method will provide information on how to open up the module/package in question.
  • This will allow existing code to immediately see what "add-opens" flags they need to add.

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.


This comment has been minimized.

Copy link

commented Aug 9, 2019

Thumbs up on this idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.