Skip to content

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Jan 8, 2026

Bump ruby-lsp dependencies to fix crash with Ruby master

After ruby/ruby#15825, tsort becomes a bundled gem and projects using it must declare it as a dependency.

rbs, which is a dependency of ruby-lsp, only added tsort in its 4.0 releases. So this change bumps ruby-lsp's dependencies, specifically rbs, to 4.0.

Fix Ruby 4.0 compatibility issues

  • Add Gemfile with test dependencies (minitest,csv, gruff, etc.)
  • Pin minitest to version 5.x to avoid breaking changes introduced in minitest 6.x
  • Require minitest/mock in test_helper.rb for stub method
  • Update CI to use bundler-cache and bundle exec

@st0012 st0012 force-pushed the bump-ruby-lsp-dependencies branch 4 times, most recently from e40c457 to 98e8427 Compare January 8, 2026 16:51
@st0012 st0012 force-pushed the bump-ruby-lsp-dependencies branch 7 times, most recently from a98d945 to 325af28 Compare January 8, 2026 18:49
@st0012 st0012 force-pushed the bump-ruby-lsp-dependencies branch 3 times, most recently from 55bb0c2 to fc66b52 Compare January 8, 2026 21:03
# Benchmarks that need Bundler (e.g., railsbench) set up their own via use_gemfile.
# This is important when running tests under `bundle exec rake test`.
result = if defined?(Bundler)
Bundler.with_unbundled_env do
Copy link
Member Author

@st0012 st0012 Jan 8, 2026

Choose a reason for hiding this comment

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

I added here because if someone runs benchmark with bundle, like bundle exec ruby -I harness benchmarks/fib.rb, it should pass & not be affected by project-level bundle too.

@st0012 st0012 mentioned this pull request Jan 8, 2026
st0012 added 3 commits January 8, 2026 21:18
After ruby/ruby#15825, `tsort` becomes a bundled
gem and projects using it must declare it as a dependency.

`rbs`, which is a dependency of `ruby-lsp`, only added `tsort` in its
4.0 releases. So this change bumps ruby-lsp's dependencies, specifically
rbs, to 4.0.
- Add Gemfile with test dependencies (minitest,csv, gruff, etc.)
- Pin minitest to version 5.x to avoid breaking changes introduced in minitest 6.x
- Require minitest/mock in test_helper.rb for stub method
- Update CI to use bundler-cache and bundle exec
@st0012 st0012 force-pushed the bump-ruby-lsp-dependencies branch from fc66b52 to 1d18bb3 Compare January 8, 2026 21:18
@st0012 st0012 changed the title Bump ruby-lsp dependencies to fix crash with Ruby master Fix CI and ruby-lsp benchmark Jan 8, 2026
@hsbt
Copy link
Member

hsbt commented Jan 8, 2026

🙏 Thanks

@st0012 st0012 merged commit f53bc29 into ruby:main Jan 8, 2026
9 of 11 checks passed
@st0012 st0012 deleted the bump-ruby-lsp-dependencies branch January 8, 2026 22:27
@eregon
Copy link
Member

eregon commented Jan 9, 2026

To link things together, this broke the test (truffleruby), which was then made ignore-failures in #460.
The failure seems due to a csv or truffleruby bug: truffleruby/truffleruby#4079

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.

5 participants