Skip to content

Support Ruby HEAD; Drop Ruby 3.1#20

Open
pboling wants to merge 13 commits intojoker1007:mainfrom
pboling:tree_haver
Open

Support Ruby HEAD; Drop Ruby 3.1#20
pboling wants to merge 13 commits intojoker1007:mainfrom
pboling:tree_haver

Conversation

@pboling
Copy link
Contributor

@pboling pboling commented Jan 31, 2026

This PR is tracking changes in my fork, where I am working on:

  • Update rb-sys and magnus to support building against Ruby 4.1.0+1 (current HEAD)
  • Drop support for Ruby 3.1
  • Moved Ruby 3.2 to discrete workflow, in anticipation of being dropped by bundler/rubygems, and eventually magnus, and then this gem.

Refs:

Includes (on top of):

@pboling pboling changed the title Tracking PR Tracking PR - Ruby HEAD compat Jan 31, 2026
@pboling pboling changed the title Tracking PR - Ruby HEAD compat Tracking PR - Ruby HEAD & tree-sitter v0.26 compat Jan 31, 2026
@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2026

@joker1007 My fix to rb-sys to make it compatible with Ruby 4.1 (HEAD) was merged, and now the CI passes!

Just needed to target rb_sys in git.

@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2026

The CI failure on Ruby 3.3 was a fluke network error checking out a dependency from git.

@pboling pboling marked this pull request as ready for review February 20, 2026 02:28
Copilot AI review requested due to automatic review settings February 20, 2026 02:28
@pboling pboling changed the title Tracking PR - Ruby HEAD & tree-sitter v0.26 compat Support Ruby HEAD & tree-sitter v0.26 compat Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates tree_stump’s dependencies and project metadata to track tree-sitter 0.26 / LANGUAGE_VERSION 15 and enable builds against Ruby HEAD (4.1.0+1), including CI coverage for ruby-head.

Changes:

  • Bump rb_sys gem dependency to ~> 0.9.124.
  • Switch Rust extension dependencies to rb-sys 0.9.124 and a pinned git revision of magnus.
  • Document platform compatibility and add ruby-head to the CI matrix.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tree_stump.gemspec Updates runtime dependency on rb_sys to 0.9.124.
ext/tree_stump/Cargo.toml Uses a pinned git magnus rev and bumps rb-sys crate version.
Gemfile Overrides rb_sys to track upstream git main (Ruby HEAD support).
Cargo.lock Lockfile updates reflecting new Rust dependency sources/versions.
README.md Clarifies MRI focus and adds a platform compatibility section.
.github/workflows/rspec.yml Adds ruby-head as an experimental CI target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2026

@joker1007 Since Ruby 3.2 goes EOL in just over a month, and will subsequently be dropped by rubygems/bundler, I've split out the Ruby 3.2 into a discrete workflow.
I've also added a workflow for Ruby 3.1, which hadn't been in the matrix prior, likely since it requires an explictly old version of rubyges/bundler.

This will make it easy to drop support for either version - just delete the workflow and update the readme.

Also, if you want we could make the EOL builds experimental, since support can only be "best effort", since the ruby is EOL, but I haven't done that yet.

@pboling pboling changed the title Support Ruby HEAD & tree-sitter v0.26 compat Support Ruby HEAD; Drop Ruby 3.1; tree-sitter v0.26 compat Feb 20, 2026
@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2026

@joker1007 Turns out we can't support Ruby 3.1 at all because magnus no longer supports it. So we have no choice but to increment the minimum required ruby version in the gemspec to 3.2.

pboling and others added 13 commits February 19, 2026 23:34
# Conflicts:
#	.github/workflows/rspec.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- magnus: Now uses rev = "b77ee863fc4311627658841f09e98f9c0374eeae" instead of branch main
- rb-sys: Now uses rev = "5e2978121cd809d33fd1aeca54c685ebe6dc01de" instead of branch main

# Conflicts:
#	Gemfile
…t source

- both tree_stump and Magnus resolve to the exact same crates.io package
- Cargo unifies them into a single dependency (with the feature enabled)
- no linking conflict
- It was already implicitly no longer supported
- We can't support Ruby versions that magnus doesn't support
@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2026

@joker1007 Now it's fully baked. :)

[dependencies]
magnus = { version = "0.8.2" }
rb-sys = { version = "0.9.119", features = ["stable-api-compiled-fallback"] }
magnus = { git = "https://github.com/matsadler/magnus.git", rev = "b77ee863fc4311627658841f09e98f9c0374eeae" }
Copy link
Owner

Choose a reason for hiding this comment

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

Thank you very much!

There's one thing that concerns me.
As a personal policy, I prefer not to specify particular Git commits for dependencies used in actual builds.
If possible, I would prefer to wait for the next version of magnus to be released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, no worries. We can leave this open until then. Nothing urgent here - other than an all green build. 📦

Copy link
Contributor Author

@pboling pboling Feb 21, 2026

Choose a reason for hiding this comment

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

@matsadler & @gjtorikian - any idea when there will be a next release of magnus?

@pboling pboling changed the title Support Ruby HEAD; Drop Ruby 3.1; tree-sitter v0.26 compat Support Ruby HEAD; Drop Ruby 3.1 Feb 21, 2026
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