Truffleruby Compatibility
ollym opened this issue · 4 comments
ollym commented
$ require 'anyway_config'
<internal:core> core/kernel.rb:226:in `gem_original_require': /Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/gems/gems/anyway_config-2.3.0/lib/.rbnext/3.1/anyway/tracing.rb:10: syntax error, unexpected '=' (SyntaxError)
from <internal:/Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/mri/rubygems/core_ext/kernel_require.rb>:96:in `require'
from /Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/gems/gems/anyway_config-2.3.0/lib/anyway_config.rb:17:in `<top (required)>'
from <internal:core> core/kernel.rb:234:in `gem_original_require'
from <internal:/Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/mri/rubygems/core_ext/kernel_require.rb>:160:in `require'
from (irb):1:in `<top (required)>'
from <internal:core> core/kernel.rb:407:in `loop'
from <internal:core> core/throw_catch.rb:36:in `catch'
from <internal:core> core/throw_catch.rb:36:in `catch'
from /Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/gems/gems/irb-1.3.5/exe/irb:11:in `<top (required)>'
from <internal:core> core/kernel.rb:376:in `load'
from <internal:core> core/kernel.rb:376:in `load'
from /Users/ollym/.rbenv/versions/truffleruby-22.2.0/bin/irb:42:in `<main>'
<internal:core> core/kernel.rb:236:in `gem_original_require': cannot load such file -- anyway_config (LoadError)
from <internal:/Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/mri/rubygems/core_ext/kernel_require.rb>:85:in `require'
from (irb):1:in `<top (required)>'
from <internal:core> core/kernel.rb:407:in `loop'
from <internal:core> core/throw_catch.rb:36:in `catch'
from <internal:core> core/throw_catch.rb:36:in `catch'
from /Users/ollym/.rbenv/versions/truffleruby-22.2.0/lib/gems/gems/irb-1.3.5/exe/irb:11:in `<top (required)>'
from <internal:core> core/kernel.rb:376:in `load'
from <internal:core> core/kernel.rb:376:in `load'
from /Users/ollym/.rbenv/versions/truffleruby-22.2.0/bin/irb:42:in `<main>'
ollym commented
The issue is here:
https://github.com/palkan/anyway_config/blob/master/lib/anyway/tracing.rb#L10
Truffleruby doesn't support endless method definition
palkan commented
Thanks for reporting.
Could you please share the value of RUBY_VERSION
in this version of TruffleRuby? I guess, it claims it's 3.x and at the same time doesn't support all Ruby 3 features.
Moving this to Ruby Next, since it's related to transpiled files loading functionality. Ok, I can not move issues between orgs 🙂.
palkan commented
Fixed in ruby-next 0.15.2