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

Set Ruby to 3.1.2 #167

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

HarlemSquirrel
Copy link

No description provided.

@HarlemSquirrel HarlemSquirrel force-pushed the ruby-3.1.2 branch 2 times, most recently from 1ab2d04 to fb3be2c Compare June 7, 2022 13:52
@laurent-martin
Copy link

I am afraid that it is not as easy. using another ruby version requires also to modify the ruby language source code.

@HarlemSquirrel
Copy link
Author

Ah so we have to pull in Ruby source to ruby directory here?

@laurent-martin
Copy link

Yes, and report all changes, as far as I understand, you can find them:

grep -rE 'Hack (start|end)' .

It would have been nice if all that was included in ruby code directly...

or if those changes were reported automatically in ruby code after processing, instead of manual change, if it's the current case.

@HarlemSquirrel
Copy link
Author

I pulled in ruby from https://github.com/ruby/ruby/releases/tag/v3_1_2

Not sure if this is what you're looking for

➤  grep -rE 'Hack (start|end)' .
./vendor/gdbm/src/gdbmopen.c:// --------- [Enclose.IO Hack start] ---------
./vendor/gdbm/src/gdbmopen.c:// --------- [Enclose.IO Hack end] ---------

@laurent-martin
Copy link

Well, I mean rather this:

./ruby/process.c:// --------- [Enclose.IO Hack start] ---------
./ruby/process.c:// --------- [Enclose.IO Hack end] ---------
./ruby/util.c:// --------- [Enclose.IO Hack start] ---------
./ruby/util.c:// --------- [Enclose.IO Hack end] ---------
./ruby/io.c:// --------- [Enclose.IO Hack start] ---------
./ruby/io.c:// --------- [Enclose.IO Hack end] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack start] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack end] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack start] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack end] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack start] ---------
./ruby/ruby.c:// --------- [Enclose.IO Hack end] ---------
./ruby/ext/dbm/extconf.rb:# --------- [Enclose.IO Hack start] ---------
./ruby/ext/dbm/extconf.rb:# --------- [Enclose.IO Hack end] ---------
./ruby/ext/openssl/ossl_x509store.c:// --------- [Enclose.IO Hack start] ---------
./ruby/ext/openssl/ossl_x509store.c:// --------- [Enclose.IO Hack end] ---------
./ruby/ext/openssl/ossl_x509store.c:    // --------- [Enclose.IO Hack start] ---------
./ruby/ext/openssl/ossl_x509store.c:    // --------- [Enclose.IO Hack end] ---------
./ruby/dln.c:// --------- [Enclose.IO Hack start] ---------
./ruby/dln.c:// --------- [Enclose.IO Hack end] ---------
./ruby/dir.c:// --------- [Enclose.IO Hack start] ---------
./ruby/dir.c:// --------- [Enclose.IO Hack end] ---------
./ruby/main.c:// --------- [Enclose.IO Hack start] ---------
./ruby/main.c:// --------- [Enclose.IO Hack end] ---------
./ruby/main.c:// --------- [Enclose.IO Hack start] ---------
./ruby/main.c:// --------- [Enclose.IO Hack end] ---------
./ruby/lib/rubygems/path_support.rb:    # --------- [Enclose.IO Hack start] ---------
./ruby/lib/rubygems/path_support.rb:    # --------- [Enclose.IO Hack end] ---------
./ruby/lib/rubygems/path_support.rb:    # --------- [Enclose.IO Hack start] ---------
./ruby/lib/rubygems/path_support.rb:    # --------- [Enclose.IO Hack end] ---------
./ruby/file.c:// --------- [Enclose.IO Hack start] ---------
./ruby/file.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/file.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/file.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack start] ---------
./ruby/win32/win32.c:// --------- [Enclose.IO Hack end] ---------
./ruby/tool/mkconfig.rb:    # --------- [Enclose.IO Hack start] ---------
./ruby/tool/mkconfig.rb:    # --------- [Enclose.IO Hack end] ---------
./vendor/gdbm/src/gdbmopen.c:// --------- [Enclose.IO Hack start] ---------
./vendor/gdbm/src/gdbmopen.c:// --------- [Enclose.IO Hack end] ---------

@HarlemSquirrel
Copy link
Author

Does that come from the compilation? bundle exec rake is failing for me

/usr/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:256: multiple definition of `parseopt_program_args'; gdbm_load.o:/tmp/rubyc/gdbm/src/gdbm_load.c:33: first defined here
/usr/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:255: multiple definition of `parseopt_program_doc'; gdbm_load.o:/tmp/rubyc/gdbm/src/gdbm_load.c:32: first defined here
/usr/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:256: multiple definition of `parseopt_program_args'; gdbm_dump.o:/tmp/rubyc/gdbm/src/gdbm_dump.c:23: first defined here
/usr/bin/ld: ./libgdbmapp.a(parseopt.o):/tmp/rubyc/gdbm/src/parseopt.c:255: multiple definition of `parseopt_program_doc'; gdbm_dump.o:/tmp/rubyc/gdbm/src/gdbm_dump.c:22: first defined here
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status

@ericbeland
Copy link

ericbeland commented Sep 17, 2022

I am considering taking a pass at this. If I had to summarize the proposed process I would use, is it something like?

  • check out the project

  • grep the /ruby folder in this repo for every hack to get a list of them for reference

  • download ruby 3.1.2 source into the /ruby folder

  • make sure it builds ruby 3.1.2

  • For each hack that still aligns with the appropriate place in the current source, add it into 3.1.2.

  • For any hacks that are unaccounted for and remaining, review and see if there's somewhere to apply it to the equivalent 3.1.2 source location whereever it may now be

  • build

  • fix whatever else goes wrong

Profit???

Is this on-track? Are there other gotchas or code to change?

I see there's a large diff. Is that what was tried previously?

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

Successfully merging this pull request may close these issues.

3 participants