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

Add Ruby feature consistency tests #27

Open
lloeki opened this issue Nov 20, 2024 · 0 comments
Open

Add Ruby feature consistency tests #27

lloeki opened this issue Nov 20, 2024 · 0 comments

Comments

@lloeki
Copy link
Member

lloeki commented Nov 20, 2024

Some bundled gems (or default gems in older versions) are dependent on the OS providing native libraries:

  • openssl
  • gdbm (unbundled on 3.3+)
  • fiddle
  • psych
  • zlib

Some versions have conditional support for certain features:

  • yjit (available since 3.1, requires a Rust compiler since 3.2)

These conditionals fail silently if their dependencies are unsatisfied: this may result in a successful build of Ruby that end up lacking expected features.

Therefore we can only ensure our builds are consistent in features via testing after the fact.

Example smoke tests:

ruby -rzlib -e 'p Zlib.zlib_version'
ruby -ropenssl -e 'p OpenSSL::Cipher.ciphers'
ruby -rjson -e 'puts JSON.dump({foo: "bar"})'
ruby -ryaml -e 'puts YAML.dump({foo: "bar"})'
ruby -rfiddle -e 'Fiddle.dlopen(nil).tap { |libc| p Fiddle::Function.new(libc["malloc"], [Fiddle::TYPE_SIZE_T], Fiddle::TYPE_VOIDP).call(42) }'

ruby --yjit -e ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant