From: "Eregon (Benoit Daloze) via ruby-core" Date: 2024-10-02T20:52:02+00:00 Subject: [ruby-core:119411] [Ruby master Bug#20714] Handle optional dependencies in `bundled_gems.rb` Issue #20714 has been updated by Eregon (Benoit Daloze). > OK, I'll revert all related changes if that's what you said that. I'm considering how to suppress needless warning with your request, But I can't collaborate with your tone. I don't see anything wrong about @Earlopain 's tone. And his concerns seem valid to me. Probably there was a misunderstanding? I do find it strange that @hsbt would merge the PR after general consensus here and then push a commit which basically reverts the PR except for one specific case, and not even mention it here. Maybe there was some unexpected test failure or so which prompted a quick change? It's a bit as if there was a bug and a fix is merged, and then silently reverted. That would be unexpected, right? @hsbt Could you explain why you think it's better to only do this behavior for fiddle and not for other gems? I don't see that in the commit message or anywhere. This issue description is clear that it's not about that one specific case. ---------------------------------------- Bug #20714: Handle optional dependencies in `bundled_gems.rb` https://bugs.ruby-lang.org/issues/20714#change-110025 * Author: Earlopain (A S) * Status: Assigned * Assignee: hsbt (Hiroshi SHIBATA) * ruby -v: 3.3.5 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I've encountered a few places around bundled gems where the library doesn't care if the gem is available, but will still provide some functionallity if it is. The way to accomplish that right now seems to be by setting `$VERBOSE = nil` and resetting it later again to not bother the user with the warning about the gem. However, this has the effect of silencing the warning about other gems as well, that may not be prepared about the bundling. >From `ruby/reline` for example: https://github.com/ruby/reline/blob/c90f08f7e308d2f1cdd7cfaf9939fe45ce546fd2/lib/reline/terminfo.rb#L1-L15 Or the `logging` gem: https://github.com/TwP/logging/blob/df41715364f7eb8c65098cd3c3316677ef1f3784/lib/logging.rb#L9-L15 I propose to simply delay the warning to the next require. GitHub PR at https://github.com/ruby/ruby/pull/11545 -- 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/lists/ruby-core.ml.ruby-lang.org/