Skip to content

Conversation

@chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Oct 28, 2025

  • Remove an old hack unnecessary on modern DRB, especially since Avoid use of id2ref for weak mapping ruby/drb#35
  • Ensure DRB is shut down cleanly during tests to avoid confusing/messy stack traces as seen here.
  • ensure consistent drb version between client and server when using child processes
  • make drb specs a little faster by using --dev on jruby

This doesn't seem needed any longer, especially since 2.2.3: ruby/drb#35
Without this, you get nasty warnings like the below.

warning: thread "Ruby-0-Thread-1: /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1584" terminated with exception (report_on_exception is true):warning: thread "Ruby-0-Thread-38: /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1584" terminated with exception (report_on_exception is true):IOError: closed stream
              select at org/jruby/RubyIO.java:3930
  accept_or_shutdown at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1015
              accept at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1001
           main_loop at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1765
                 run at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1586
IOError: closed stream
              select at org/jruby/RubyIO.java:3930
  accept_or_shutdown at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1015
              accept at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1001
           main_loop at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1765
                 run at /Users/chad/.local/share/mise/installs/ruby/jruby-9.4.14.0/lib/ruby/gems/shared/gems/drb-2.2.3/lib/drb/drb.rb:1586
@chadlwilson chadlwilson added this to the 2.1.1 milestone Oct 28, 2025
… parent, not stdlib version

Without this, tests break on JRuby 10 with errors such as `0x0000000000000fb4 is not id value` because `_idstr` is
not used any longer. We want ruby/drb#35 to be available, requiring 2.2.3 on both client and server.
These are very short-lived processes, so optimisations aren't generally helpful. Shaves about 25% off bundler_spec.rb time (57s -> 46s) on a very quick machine.
@chadlwilson chadlwilson merged commit 5485837 into jruby:master Oct 28, 2025
20 checks passed
@chadlwilson chadlwilson deleted the simplify-drb-usage branch October 28, 2025 13:19
@chadlwilson chadlwilson changed the title tests: Simplify drb usage tests: optimize drb usage by specs Oct 28, 2025
@chadlwilson chadlwilson changed the title tests: optimize drb usage by specs tests: simply & optimize spec drb usage Oct 28, 2025
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