From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2A48D1F4C1 for ; Wed, 13 Nov 2024 18:05:49 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=p11hmr4g; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=W0Msn0E6; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1731521116; bh=OoH2t5vP7Kyln4e/9SozDnSXqKz92gwQEX7cxM8aV8Y=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=p11hmr4gf+e+5IkYhvM4mCyTMcMYj/6AMca0QwtOV9XOYnN6OeQSeht0W/a7YYoNA Xhkb238nGRR5KWpwKYSGt9AZuIxpQMEurzwxCJ+uDjW6aX+MkZLBQTiD7HHdGuxZXw gS5d/9KUOPoOaGjomVsBTFiQewX/L5yTlmXBFAHY= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 0743144BD2 for ; Wed, 13 Nov 2024 18:05:16 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=W0Msn0E6; dkim-atps=neutral Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id E3B4C44B1D for ; Wed, 13 Nov 2024 18:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=3y/eZ5iMiceemzIP5HR1xpVKrg+E/GXVEw06Lqb5Wo8=; b=W0Msn0E6cJlrAufRC2MYq/1GNPtCEUhRLX8U1fMVQKGmVTZ1PIQnSORUB5CeKc1zpcir MPGXOVpQLfW8Y+RRDKanMP82+1627V0L2CzEerfTo+twv6Q1w5PPg4Rfg/obE+G6VrviWJ JnlBlw4Qqn1jlT8PsSxpPTyrvWu/0gxg0Y9rTXbxcWDhq1CHA3pE8ftZfOfu6fG8YayEnT 2wVCeWo0E2b8a8NDgzuCgXULg2aYfvTudYTutNF30NscS4MjKiNxXVoqaslzfcmiyKs6Jr o2nvE/3MlRG6YBmAh6Ooc3kn69/yQtrJlsc7UMJ32LI1/bRRzwsS1mKYylhaNrpg== Received: by recvd-94b86bfcc-p5fcb with SMTP id recvd-94b86bfcc-p5fcb-1-6734EA4D-C 2024-11-13 18:05:01.639099083 +0000 UTC m=+5357264.273004941 Received: from herokuapp.com (unknown) by geopod-ismtpd-17 (SG) with ESMTP id jAffwwnQSxGxuKUfUpF9dQ for ; Wed, 13 Nov 2024 18:05:01.627 +0000 (UTC) Date: Wed, 13 Nov 2024 18:05:31 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20714 X-Redmine-Issue-Author: Earlopain X-Redmine-Issue-Assignee: hsbt X-Redmine-Issue-Priority: Normal X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 96591 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax314wH6tVKzHYJHi7d7YS5x9ac2yV0?= =?us-ascii?Q?xMhvRb66INz5L3xWEZMkn+gjOm8MCMc9tp8Nn0B?= =?us-ascii?Q?AQRynZ7ct4WnNf0wUlHeNIHUPlq8Tqvk2DZS5+D?= =?us-ascii?Q?EW0edSsMQaSsB56pYfzEpcxN1FzQNo+aI9RhC=2F3?= =?us-ascii?Q?heV5nRYpQioOj3EY8uWLN+osLA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: DOVXMZ5OBPUUBOVBKBBVOU4EBEFWUOV5 X-Message-ID-Hash: DOVXMZ5OBPUUBOVBKBBVOU4EBEFWUOV5 X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:119920] [Ruby master Bug#20714] Handle optional dependencies in `bundled_gems.rb` List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Eregon (Benoit Daloze) via ruby-core" Cc: "Eregon (Benoit Daloze)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20714 has been updated by Eregon (Benoit Daloze). I think the trouble is on `require 'fiddle'` in 3.4, e.g. in reline, it would actually succeed (and return true): ```ruby source 'https://rubygems.org' gem 'reline' ``` ``` $ bundle install $ bundle exec ruby -ve 'require "reline"; p Fiddle' ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +PRISM [x86_64-linux] Fiddle ``` If we remove the `$VERBOSE` changes in lib/reline/terminfo.rb: ``` $ bundle exec ruby -e 'require "reline"; p Fiddle' /home/eregon/tmp/reline-gemfile/vendor/bundle/ruby/3.4.0+0/gems/reline-0.5.11/lib/reline.rb:9: warning: fiddle was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. You can add fiddle to your Gemfile or gemspec to silence this warning. Fiddle ``` So I think https://github.com/ruby/ruby/pull/11550 wouldn't solve that. ---------------------------------------- Bug #20714: Handle optional dependencies in `bundled_gems.rb` https://bugs.ruby-lang.org/issues/20714#change-110642 * Author: Earlopain (Earlopain _) * 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/