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

Do not compile the C extension on TruffleRuby #71

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

eregon
Copy link
Member

@eregon eregon commented Nov 24, 2023

The approach is similar to the one in strscan, notably:

Write conditions in a way that any other Ruby implementation would
simply use its stdlib until it is added explicit support in this gem.

TruffleRuby is not added in CI because there are quite a few failures:

89 tests, 508 assertions, 22 failures, 7 errors, 0 pendings, 1 omissions, 0 notifications
67.0455% passed

It makes more sense to fix https://github.com/oracle/truffleruby/blob/master/lib/truffle/stringio.rb to pass more of the tests before adding TruffleRuby to the CI.

Note that gem install stringio and any Gemfile transitively including stringio is broken on truffleruby-dev until this is merged and released.
So it would be awesome if we could have a quick release of stringio with this fix.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Rakefile Outdated Show resolved Hide resolved
Rakefile Outdated Show resolved Hide resolved
* Before this it was compiled but not used, because TruffleRuby has
  a stringio.rb in stdlib and .rb has precedence over .so.
  In fact that extension never worked on TruffleRuby,
  because rb_io_extract_modeenc() has never been defined on TruffleRuby.
* So this just skip compiling the extension since compilation of it now fails:
  ruby/openssl#699
@eregon eregon force-pushed the do-not-compile-on-truffleruby branch from 5fd530a to c2b09a6 Compare November 27, 2023 11:14
@eregon
Copy link
Member Author

eregon commented Nov 27, 2023

@kou All done now.

@nobu nobu merged commit d791b63 into ruby:master Nov 27, 2023
26 checks passed
nobu added a commit that referenced this pull request Nov 27, 2023
@eregon
Copy link
Member Author

eregon commented Nov 27, 2023

@nobu Thanks for merging and the changelog entry!
Could you make a release or should @kou do that?

st0012 added a commit to ruby/irb that referenced this pull request Nov 27, 2023
@kou
Copy link
Member

kou commented Nov 28, 2023

Released!

@junaruga
Copy link
Member

Thank you for releasing the stringio 3.1.0!
https://rubygems.org/gems/stringio

@eregon
Copy link
Member Author

eregon commented Nov 28, 2023

Thanks for the release.
For some reason it seems RubyGems & Bundler can't use 3.1.0 yet, maybe some caching issue?
I filed rubygems/rubygems#7202

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

Successfully merging this pull request may close these issues.

4 participants