Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby Head compatibility #556

Open
2 tasks
palkan opened this issue Nov 13, 2024 · 3 comments
Open
2 tasks

Ruby Head compatibility #556

palkan opened this issue Nov 13, 2024 · 3 comments

Comments

@palkan
Copy link

palkan commented Nov 13, 2024

I'm actively experimenting with the head Ruby builds (mostly due to #555) and collecting some compatibility
issues compared to 3.3 release here.

Gem/lib versions:

  • ruby_wasm: 2.7.0
  • js: 2.7.0

This commit broke loading tempfile.rb: ruby/ruby@136cbf0

require "tempfile"

# => 'File#initialize': No such file or directory @ rb_sysopen - /dev/null (Errno::ENOENT)

Not sure how to properly handle /dev/null in Wasm, though; maybe, we should return nil for IO::NULL and check for nil-ness whenever it's used 🤔

require "digest/sha1"

#=> <internal:/usr/local/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require': rb_digest_wrap_metadata not found (LoadError)
<internal:/usr/local/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
eval:3:in '<main>'
-e:in 'Kernel.eval'

Worked fine in 3.3.

@palkan palkan changed the title Ruby head: tempfile vs. /dev/null Ruby Head compatibility Nov 14, 2024
@palkan
Copy link
Author

palkan commented Nov 15, 2024

I've bisected the second problem (digest): ruby/ruby@0619312

@kateinoigakukun
Copy link
Member

Thanks! I've made patches for those issues: ruby/tempfile#38, ruby/digest#71

@SamSaffron
Copy link

wow this is awesome, any news about when a new release can be cut for head? I noticed that "https://cdn.jsdelivr.net/npm/@ruby/ruby-head-wasm-wasi/dist/ruby-head-wasm-wasi.wasm" is still pointing at 3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants