oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
3.02k stars 185 forks source link

RBS gen doesn't work with Truffleruby #2691

Closed mrwormhole closed 2 years ago

mrwormhole commented 2 years ago

Ruby Version truffleruby 22.3.0-dev-3dfcaa03, like ruby 3.0.3, GraalVM CE Native [x86_64-linux]

RBS gem version 2.6.0

Error message I am getting when I run the command

class Dog
  def bark
    "woof,woof"
  end
end
rbs prototype rb dog.rb
Not supported on this interpreter (truffleruby).

Notes It works on other ruby versions

eregon commented 2 years ago

As it says, rbs prototype doesn't support anything but CRuby, because it depends on RubyVM, an unstable experimental CRuby-specific API: https://github.com/ruby/rbs/issues/348 The rest of rbs should work.