You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We may use rbs to get information for core classes/modules/methods like ruby-lspdoes. However, rbs doesn't support JRuby so the implementation needs to be conditional.
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.
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 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.
The main challenge of this support comes from acquiring the C-method source files:
ruby-install
orruby-build -k
, Ruby's C source code wouldn't be preserved after Ruby is builtruby-install
andruby-build -k
, the location of sources are different:ruby-install
:~/src
or/usr/local/src
for the root userruby-build -k
:~/.cache
pry-doc
to serve as an installable source databaseSo instead of relying on the installed CRuby source, downloading the source later may be a better approach (proposed by @k0kubun).
Questions:
rdoc
,irb
, or another tool's responsibility to perform this action?The text was updated successfully, but these errors were encountered: