Open davidrunger opened 1 month ago
I believe that this issue is at least somewhat related to this Ruby bug: https://bugs.ruby-lang.org/issues/20714 . (I say that because the title of that Ruby bug is "Handle optional dependencies in bundled_gems.rb
", and I think that fiddle
is indeed (in at least some versions of Ruby) indirectly an "optional dependency" of byebug
. byebug
requires readline
, which might try to require reline
, which requires reline/terminfo
, which "optionally" tries to require fiddle
.)
That Ruby bug, in turn, has generated these two PRs:
However:
byebug
does need fiddle
(though I have zero idea whether or not byebug actually does need fiddle), then I guess that what would happen if https://github.com/ruby/ruby/pull/11550 were to be merged, for example, is that we would no longer warn about the attempt to optionally require fiddle
, but the attempt to require fiddle
will start failing in future versions of Ruby that don't include fiddle
in the standard library, and so byebug will not have the functionality that it needs from fiddle (which, again, I don't know whether or not there actually is any functionality from fiddle that byebug does need).I have just submitted a PR that I think will fix this issue: https://github.com/deivid-rodriguez/byebug/pull/852 (though I don't really know whether or not it's a good idea to merge that PR).
Note: Looking at the path of require
s that ultimately lead to requiring fiddle
, I think that this bug will only occur if require "readline.#{RbConfig::CONFIG["DLEXT"]}"
raises an exception? See here, where we only try to require reline
(which then requires fiddle
) if that require "readline.#{RbConfig::CONFIG["DLEXT"]}"
attempt fails. On my machine, that require
attempt does raise an exception, and so I do see these warnings on Ruby 3.3.5. But, for someone on whose machine require "readline.#{RbConfig::CONFIG["DLEXT"]}"
succeeds, I guess that they won't see the warning that is the subject of this bug report.
Problem description
A warning is printed to stderr when using byebug on Ruby 3.3.5:
Expected behavior
No warning is printed.
Actual behavior
The aforementioned warning is printed.
Steps to reproduce the problem
Reproduction script
Output
This issue is about the fact that those last two lines of warning output are printed. We don't want any warnings to be printed.