net-http icon indicating copy to clipboard operation
net-http copied to clipboard

Support pretty_print

Open nobu opened this issue 2 years ago • 4 comments

nobu avatar Oct 30 '23 09:10 nobu

We may use rbs to get information for core classes/modules/methods like ruby-lsp does. However, rbs doesn't support JRuby so the implementation needs to be conditional.

st0012 avatar Jun 17 '24 18:06 st0012

It should not require significant changes to JRuby to support rbs type information for core classes. The information is all available in the JRuby .class files and .jar file.

In addition, the currently-running JRuby's sources can always be fetched from Maven Central and used to extract the Java sources of those core methods.

headius avatar Jun 17 '24 22:06 headius

To make sure we're talking about the same thing: what I'm referring to is that the rbs gem won't compile with JRuby as described here. I thought it needs to be resolved from the rbs side?

st0012 avatar Jun 17 '24 22:06 st0012

@st0012 The last few comments on that issue describe the path forward more clearly. You are correct that JRuby does not support the rbs native extension (JRuby does not support the CRuby extension API at all) but @soutaro mentioned in that issue that there's some work going on to make a pure-Ruby parser to eliminate this issue. When that is available, rbs should work fine on JRuby.

headius avatar Jun 17 '24 22:06 headius