From: "Earlopain (A S) via ruby-core" Date: 2024-09-30T08:34:24+00:00 Subject: [ruby-core:119354] [Ruby master Bug#20714] Handle optional dependencies in `bundled_gems.rb` Issue #20714 has been updated by Earlopain (A S). https://github.com/ruby/ruby/commit/3a9e48b9a4860022f43d8101c0f3249299437886 this seems better but I still question the rationale. I don't see the point in giving `fiddle` special treatment with `OPTIONAL`. What problem is this solving? All it does is supress the warning from `reline` (which is suppressed directly in the gem right now anyways) when `fiddle` is gone in 3.5 but all the other gems that are still do warn. It seems needlessly inconsistent. Again, if a gem is optional depends on how it is used. Don't give everyone else with `fiddle` the same treatment just because `reline` does it in a specific way. My opinion is that either all gems should warn indefinitely or none. ---------------------------------------- Bug #20714: Handle optional dependencies in `bundled_gems.rb` https://bugs.ruby-lang.org/issues/20714#change-109967 * 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/