ostruct has been removed from the standard library and must be required as a gem dependency. This requires users to add the ostruct dependency explicitly when using DelayedJob in a standalone Ruby library otherwise the gem fails with a runtime error1:
/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/delayed_job-4.2.0/spec/delayed/backend/test.rb:1: warning: ostruct used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- ostruct (LoadError)
Did you mean? tsort
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/delayed_job-4.2.0/spec/delayed/backend/test.rb:1:in '<top (required)>'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel.require'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/instrumentation/delayed_job/test/test_helper.rb:35:in '<top (required)>'
from /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb:7:in 'Kernel#require_relative'
from /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/instrumentation/delayed_job/test/opentelemetry/instrumentation/delayed_job/plugins/tracer_plugin_test.rb:7:in '<top (required)>'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'Kernel.require'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/4.0.0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in 'Array#select'
from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in '<main>'
Ideally DelayedJob should declare the ostruct gem as a dependency to avoid requiring users to explicitly add transitive dependencies in their Gemfiles or gemspecs.
ostructhas been removed from the standard library and must be required as a gem dependency. This requires users to add theostructdependency explicitly when using DelayedJob in a standalone Ruby library otherwise the gem fails with a runtime error1:Ideally DelayedJob should declare the
ostructgem as a dependency to avoid requiring users to explicitly add transitive dependencies in their Gemfiles or gemspecs.delayed_job/spec/delayed/backend/test.rb
Line 1 in eaef62d
Footnotes
https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/20698253337/job/59416695028#step:3:187 ↩