ruby-core

Mailing list archive

[#114703] [Ruby master Bug#19875] Ruby 2.7 -> 3.1 Performance regression in String#count — "iz (Illia Zub) via ruby-core" <ruby-core@...>

Issue #19875 has been reported by iz (Illia Zub).

18 messages 2023/09/12

[#114774] [Ruby master Feature#19884] Make Safe Navigation Operator work on classes — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>

Issue #19884 has been reported by p8 (Petrik de Heus).

13 messages 2023/09/15

[#114796] [Ruby master Feature#19889] Let `Kernel.#require` search for files relative to the current working directory for non ./, ../ relative paths — "sawa (Tsuyoshi Sawada) via ruby-core" <ruby-core@...>

Issue #19889 has been reported by sawa (Tsuyoshi Sawada).

6 messages 2023/09/18

[#114803] [Ruby master Bug#19890] File#realine(chomp: true) slower/more allocations than readline.chomp! — "segiddins (Samuel Giddins) via ruby-core" <ruby-core@...>

Issue #19890 has been reported by segiddins (Samuel Giddins).

12 messages 2023/09/18

[#114817] [Ruby master Bug#19892] Build failure with 8f1b688177 — "vo.x (Vit Ondruch) via ruby-core" <ruby-core@...>

Issue #19892 has been reported by vo.x (Vit Ondruch).

8 messages 2023/09/19

[#114915] [Ruby master Feature#19905] Introduce `Queue#peek` — "hi@... (Joao Fernandes) via ruby-core" <ruby-core@...>

Issue #19905 has been reported by hi@joaofernandes.me (Joao Fernandes).

8 messages 2023/09/28

[ruby-core:114888] [Ruby master Bug#19885] Invalid Warning for Default Gems That Will Move to Bundled Gems

From: "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>
Date: 2023-09-23 11:56:34 UTC
List: ruby-core #114888
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/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

In This Thread