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
truffleruby 20.3.0-dev-a1514d37, like ruby 2.6.6, GraalVM CE Native [x86_64-darwin]
To reproduce:
gem install cld
ruby -rcld -e 'puts CLD.detect_language("The rose is red, the violet's blue")'
Error:
~/.rubies/truffleruby-dev/lib/truffle/truffle/ffi_backend/function.rb:50:in `initialize': No enum constant com.oracle.truffle.nfi.spi.types.NativeSimpleType.STRUCT_BY_VALUE (ArgumentError)
from ~/.gem/truffleruby/2.6.6/gems/ffi-1.13.1/lib/ffi/library.rb:265:in `new'
from ~/.gem/truffleruby/2.6.6/gems/ffi-1.13.1/lib/ffi/library.rb:265:in `block in attach_function'
from ~/.gem/truffleruby/2.6.6/gems/ffi-1.13.1/lib/ffi/library.rb:252:in `each'
from ~/.gem/truffleruby/2.6.6/gems/ffi-1.13.1/lib/ffi/library.rb:252:in `attach_function'
from ~/.gem/truffleruby/2.6.6/gems/cld-0.8.0/lib/cld.rb:20:in `<module:CLD>'
from ~/.gem/truffleruby/2.6.6/gems/cld-0.8.0/lib/cld.rb:4:in `<top (required)>'
from <internal:core> core/kernel.rb:234:in `gem_original_require'
from ~/.rubies/truffleruby-dev/lib/mri/rubygems/core_ext/kernel_require.rb:130:in `require'
from <internal:core> core/unbound_method.rb:20:in `call'
from <internal:core> core/unbound_method.rb:20:in `bind_call'
from <internal:core> core/kernel.rb:267:in `require'
The text was updated successfully, but these errors were encountered:
I think this is the same source issue as in #1827 (comment) that is,
Truffle NFI does not support passing struct-by-value yet (internal issue: GR-13304).
And so our FFI implementation which uses Truffle NFI cannot yet either.
I'm also running into this - I'm developing a new gem based on FFI and wanted to ensure compatibility with Truffle Ruby, but all of my CI tests started failing when using Struct.by_value.
To reproduce:
Error:
The text was updated successfully, but these errors were encountered: