
Issue #19885 has been updated by hsbt (Hiroshi SHIBATA). @jeremyevans0 Thanks. I'm considering to skip this warning from rubygems. I think we should only warn it if environment didn't have gem like webrick.
Note that you also get the warning when loading a gem that has bigdecimal as a runtime dependency (this example uses Sequel 5.72.0, which has a runtime dependency on bigdecimal as you can see at https://rubygems.org/gems/sequel/versions/5.72.0):
I could reproduce that. It's a bug. ``` $ gem info bigdecimal *** LOCAL GEMS *** bigdecimal (3.1.4) Authors: Kenta Murata, Zachary Scott, Shigeo Kobayashi Homepage: https://github.com/ruby/bigdecimal Licenses: Ruby, BSD-2-Clause Installed at (default): /Users/hiroshi.shibata/.local/share/rbenv/versions/3.3.0-dev/lib/ruby/gems/3.3.0+0 Arbitrary-precision decimal floating-point number library. ~ $ ruby -v -r bigdecimal -e '' ruby 3.3.0dev (2023-09-23T07:34:20Z master d80002c902) +YJIT [arm64-darwin22] warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0 ~ $ gem i bigdecimal Fetching bigdecimal-3.1.4.gem Building native extensions. This could take a while... exists /Users/hiroshi.shibata/Documents/github.com/ruby/bigdecimal Successfully installed bigdecimal-3.1.4 1 gem installed ~ $ gem info bigdecimal *** LOCAL GEMS *** bigdecimal (3.1.4) Authors: Kenta Murata, Zachary Scott, Shigeo Kobayashi Homepage: https://github.com/ruby/bigdecimal Licenses: Ruby, BSD-2-Clause Installed at: /Users/hiroshi.shibata/.local/share/gem Arbitrary-precision decimal floating-point number library. ~ $ ruby -v -r bigdecimal -e '' ruby 3.3.0dev (2023-09-23T07:34:20Z master d80002c902) +YJIT [arm64-darwin22] warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0 ``` When user did install default gems via rubygems.org like above, we shouldn't warn that. ---------------------------------------- Bug #19885: Invalid Warning for Default Gems That Will Move to Bundled Gems https://bugs.ruby-lang.org/issues/19885#change-104745 * Author: jeremyevans0 (Jeremy Evans) * Status: Assigned * Priority: Normal * Assignee: hsbt (Hiroshi SHIBATA) * ruby -v: ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-openbsd] * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED ---------------------------------------- Starting in ruby 3.3.0-preview2, attempting to require bigdecimal, mutex_m, base64, or other libraries that will move to bundled gems in Ruby 3.4.0 results in a warning, even when bundler is not in use: ``` $ ruby33 -v -r bigdecimal -e '' ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-openbsd] warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0 ``` I think such warnings are bugs if bundler is not in use. When a library is moved from a default gem to a bundled gem, such code will work fine if not using bundler. It is only when using bundler where such code would have problems, and therefore, if Ruby warns at all, it should only warn when bundler is in use. The only time such a warning would make sense if bundler is not in use is if the library was not going to be a bundled gem. In that case, first the library should be moved from a default gem to a bundled gem, then the bundled gem that ships with Ruby should provide the warning, which you can avoid by installing an updated gem version. Note that you also get the warning when loading a gem that has bigdecimal as a runtime dependency (this example uses Sequel 5.72.0, which has a runtime dependency on bigdecimal as you can see at https://rubygems.org/gems/sequel/versions/5.72.0): ``` $ ruby33 -v -r sequel -e '' ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-openbsd] /usr/local/lib/ruby/gems/3.3/gems/sequel-5.72.0/lib/sequel/core.rb:3: warning: bigdecimal which will be not part of the default gems since Ruby 3.4.0 ``` This warning makes even less sense, because even if bigdecimal was removed as both a default gem and a bundled gem, installing Sequel 5.72.0 would install bigdecimal as a dependency. -- https://bugs.ruby-lang.org/