CI for windows-latest under Ruby 3.4 fails during bundle install:
RuntimeError: Digest::Base cannot be directly inherited in Ruby
52: C:/hostedtoolcache/windows/Ruby/3.4.9/x64/bin/toys:36:in '<main>'
...
6: C:/hostedtoolcache/windows/Ruby/3.4.9/x64/lib/ruby/gems/3.4.0/gems/bundler-4.0.13/lib/bundler/checksum.rb:17:in 'Bundler::Checksum.from_gem_package'
Explanation
- For Ruby 3.4.9, Bundler
4.0.13 resolves standard library dependencies from scratch and decides to fetch and compile the standard library gem digest (version 3.2.0) from RubyGems.
- During the checksum verification phase, Bundler requires
digest. Because the gem path is active, it loads the gem's native C extension DLL (digest.so / digest.dll).
- On Windows, loading duplicate DLLs of a preloaded C extension initializes a separate memory block, resulting in a different address for
Digest::Base. The gem's extension fails the subclassing check when instantiating Digest::SHA256.new, throwing: Digest::Base cannot be directly inherited in Ruby.
Proposed Fix
Upgrade the CI check from Ruby 3.4 to Ruby 4.0 per our current maintenance schedule. In Ruby 4.0, standard libraries like digest are fully extracted from the interpreter core, which eliminates the duplicate DLL collision on Windows since only the gem version is loaded.
Note that we must probably also add ostruct as a development dependency.
CI for
windows-latestunder Ruby 3.4 fails duringbundle install:Explanation
4.0.13resolves standard library dependencies from scratch and decides to fetch and compile the standard library gemdigest(version3.2.0) from RubyGems.digest. Because the gem path is active, it loads the gem's native C extension DLL (digest.so/digest.dll).Digest::Base. The gem's extension fails the subclassing check when instantiatingDigest::SHA256.new, throwing:Digest::Base cannot be directly inherited in Ruby.Proposed Fix
Upgrade the CI check from Ruby 3.4 to Ruby 4.0 per our current maintenance schedule. In Ruby 4.0, standard libraries like
digestare fully extracted from the interpreter core, which eliminates the duplicate DLL collision on Windows since only the gem version is loaded.Note that we must probably also add
ostructas a development dependency.