Skip to content

dep: Add native Ruby 4 support, drop Ruby 3.1 support (v1.19.x)#3592

Merged
flavorjones merged 10 commits intov1.19.xfrom
flavorjones/ruby-4-native-support
Dec 28, 2025
Merged

dep: Add native Ruby 4 support, drop Ruby 3.1 support (v1.19.x)#3592
flavorjones merged 10 commits intov1.19.xfrom
flavorjones/ruby-4-native-support

Conversation

@flavorjones
Copy link
Copy Markdown
Member

@flavorjones flavorjones commented Dec 26, 2025

What problem is this PR intended to solve?

#3590, bumping some other dev dependencies along the way

Note that this will be the first release of v1.19.x which is an extension of v1.18.x.

Have you included adequate test coverage?

Existing coverage is adequate.

Does this change affect the behavior of either the C or the Java implementations?

No functional changes.

@flavorjones flavorjones force-pushed the flavorjones/ruby-4-native-support branch 10 times, most recently from 239b631 to 75e33f5 Compare December 26, 2025 18:15
@flavorjones
Copy link
Copy Markdown
Member Author

Seeing segfaults in CI on darwin + ruby4 that I can reproduce locally:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffffffffffff)
  * frame #0: 0x000000018a011704 libxml2.2.dylib`xmlCharEncCloseFunc + 104
    frame #1: 0x000000018a006358 libxml2.2.dylib`xmlFreeParserInputBuffer + 52
    frame #2: 0x000000018a00685c libxml2.2.dylib`xmlFreeInputStream + 128
    frame #3: 0x000000018a0065c8 libxml2.2.dylib`xmlFreeParserCtxt + 44
    frame #4: 0x0000000100e11c10 libruby.4.0.dylib`rb_gc_obj_free + 756
    frame #5: 0x0000000100e11678 libruby.4.0.dylib`gc_sweep_plane + 348
    frame #6: 0x0000000100e114f8 libruby.4.0.dylib`gc_sweep_page + 432
    frame #7: 0x0000000100e0fee4 libruby.4.0.dylib`gc_sweep_step + 356
    frame #8: 0x0000000100e0ee60 libruby.4.0.dylib`gc_sweep + 6924
    frame #9: 0x0000000100e13794 libruby.4.0.dylib`gc_start + 3036

Investigating.

@flavorjones
Copy link
Copy Markdown
Member Author

Ah, I think the darwin issue is because the darwin linker hack was not being applied, I needed to change ~> 3.2 to >= 3.2 in 07f72d4

@flavorjones flavorjones force-pushed the flavorjones/ruby-4-native-support branch 11 times, most recently from 0d2c153 to e57c888 Compare December 27, 2025 23:49
@flavorjones flavorjones force-pushed the flavorjones/ruby-4-native-support branch from b882cc8 to d0efc55 Compare December 28, 2025 14:50
@flavorjones flavorjones changed the title dep: Add native Ruby 4 support, drop Ruby 3.1 support dep: Add native Ruby 4 support, drop Ruby 3.1 support (v1.19.x) Dec 28, 2025
- Add Ruby 4.0
- Drop Ruby 3.1
- alpine: Bump to 3.23 and add yaml-dev
- Bump host ruby to 3.4
- Rubocop target version 3.2, and associated style changes
- Drop Ruby 3.1 (required ruby version is now `>=3.2`)
- Bump some dev dependencies along the way
- Bump macos runners to macos-15{-intel}
- Re-enable sanitize test
- Make sure the darwin linker hack applies in Ruby 4
because JRuby 9.4 =~ Ruby 3.1 for which we're dropping support. Bump
rake-compiler-dock to v1.11.1.
Note we have to jump through some new hoops to use bundler in
test-gem-install because ruby's bundled minitest is still v5 and we
want to be explicit about using v6.

Also note, we need to install build-essentials into the JRuby
containers to compile prism, which is a dependency of MT6.
It's not clear to me why this is failing, but it seems like the
ZLIB_ENABLED flag is set at compile time and then the library refuses
to decompress. Not sure if it's an msys issue or what, but I don't
have time right now to investigate.
@flavorjones flavorjones force-pushed the flavorjones/ruby-4-native-support branch from d0efc55 to f8c8f74 Compare December 28, 2025 15:17
@flavorjones flavorjones merged commit 88a120f into v1.19.x Dec 28, 2025
159 checks passed
@flavorjones flavorjones deleted the flavorjones/ruby-4-native-support branch December 28, 2025 16:03
flavorjones added a commit that referenced this pull request Dec 28, 2025
**What problem is this PR intended to solve?**

#3590, bumping some other dev dependencies along the way

Note that this is a forward-port of #3592 to `main`


**Have you included adequate test coverage?**

Existing coverage is adequate.


**Does this change affect the behavior of either the C or the Java
implementations?**

No functional changes.
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.

1 participant