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

Support default extension gems #2644

Open
13 of 24 tasks
eregon opened this issue Apr 22, 2022 · 3 comments
Open
13 of 24 tasks

Support default extension gems #2644

eregon opened this issue Apr 22, 2022 · 3 comments
Assignees

Comments

@eregon
Copy link
Member

eregon commented Apr 22, 2022

This an issue to track all default gems with an extension, which might need specific support for TruffleRuby.
For some, we might just reuse the C extension and add TruffleRuby in the CI of those gems.

These default extension gems are problematic when they included in a Gemfile.lock, https://bugs.ruby-lang.org/issues/18567#note-30 has more details.
Related JRuby issue: jruby/jruby#6682

For some extensions gems, we have a different implementation, typically pure-Ruby.
For some extensions gems we use them as-is (just need to add truffleruby in CI).

Pure-Ruby gems (good to add truffleruby in CI):

@eregon eregon self-assigned this Apr 22, 2022
@chrisseaton
Copy link
Collaborator

Do JRuby have an approach to this problem? Do they all include Java code?

@eregon
Copy link
Member Author

eregon commented Apr 23, 2022

Yes basically JRuby's approach so far is to mostly upstream their JRuby-specific extension Java code into those default gems' repositories (and publish a java platform gem).
You can check the linked PRs in the linked JRuby issue for more details.

@eregon
Copy link
Member Author

eregon commented Jan 27, 2023

Here is a list of default gems with extensions in 3.1:

$ grep -a -R extensions lib/gems/specifications/default  | sort
lib/gems/specifications/default/bigdecimal-3.1.1.gemspec:  s.extensions = ["ext/bigdecimal/extconf.rb".freeze]
lib/gems/specifications/default/cgi-0.3.5.gemspec:  s.extensions = ["ext/cgi/escape/extconf.rb".freeze]
lib/gems/specifications/default/date-3.2.2.gemspec:  s.extensions = ["ext/date/extconf.rb".freeze]
lib/gems/specifications/default/digest-3.1.0.gemspec:  s.extensions = ["ext/digest/bubblebabble/extconf.rb".freeze, "ext/digest/extconf.rb".freeze, "ext/digest/md5/extconf.rb".freeze, "ext/digest/rmd160/extconf.rb".freeze, "ext/digest/sha1/extconf.rb".freeze, "ext/digest/sha2/extconf.rb".freeze]
lib/gems/specifications/default/etc-1.3.0.gemspec:  s.extensions = ["ext/etc/extconf.rb".freeze]
lib/gems/specifications/default/fcntl-1.0.1.gemspec:  s.extensions = ["ext/fcntl/extconf.rb".freeze]
lib/gems/specifications/default/fiddle-1.1.0.gemspec:  s.extensions = ["ext/fiddle/extconf.rb".freeze]
lib/gems/specifications/default/io-console-0.5.11.gemspec:  s.extensions = ["ext/io/console/extconf.rb".freeze]
lib/gems/specifications/default/io-nonblock-0.1.0.gemspec:  s.extensions = ["ext/io/nonblock/extconf.rb".freeze]
lib/gems/specifications/default/io-wait-0.2.1.gemspec:  s.extensions = ["ext/io/wait/extconf.rb".freeze]
lib/gems/specifications/default/json-2.6.1.gemspec:  s.extensions = ["ext/json/ext/generator/extconf.rb".freeze, "ext/json/ext/parser/extconf.rb".freeze, "ext/json/extconf.rb".freeze]
lib/gems/specifications/default/openssl-3.0.1.gemspec:  s.extensions = ["ext/openssl/extconf.rb".freeze]
lib/gems/specifications/default/pathname-0.2.0.gemspec:  s.extensions = ["ext/pathname/extconf.rb".freeze]
lib/gems/specifications/default/psych-4.0.4.gemspec:  s.extensions = ["ext/psych/extconf.rb".freeze]
lib/gems/specifications/default/racc-1.6.0.gemspec:  s.extensions = ["ext/racc/cparse/extconf.rb".freeze]
lib/gems/specifications/default/readline-ext-0.1.4.gemspec:  s.extensions = ["ext/readline/extconf.rb".freeze]
lib/gems/specifications/default/stringio-3.0.1.gemspec:  s.extensions = ["ext/stringio/extconf.rb".freeze]
lib/gems/specifications/default/strscan-3.0.1.gemspec:  s.extensions = ["ext/strscan/extconf.rb".freeze]
lib/gems/specifications/default/syslog-0.1.0.gemspec:  s.extensions = ["ext/syslog/extconf.rb".freeze]
lib/gems/specifications/default/zlib-2.1.1.gemspec:  s.extensions = ["ext/zlib/extconf.rb".freeze]

And for the raw list:

grep -a -R extensions lib/gems/specifications/default  | sort | ruby -e 'puts STDIN.readlines.map { |line| line[/\/([a-z-]+?)-\d/,1] }'

We should prioritize adding truffleruby in the CI of those to make sure they work and keep working on truffleruby.

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

No branches or pull requests

2 participants