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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham 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)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5ABC41F5CB for ; Fri, 27 Sep 2024 15:34:13 +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=zkn0itqa; 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=YTeKs0hJ; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1727451250; bh=tb10tC5gE5J0hD4Jv9JHRBlfvR/KpPIJTb6y8Vj0Z68=; 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=zkn0itqahASxNQj6ub1EcE918Td90TbN0Ia1Rr7azfbGUT8w10fFvOEHTYockpLAX eoCEr+bhgy4631tiD/+q+dpxOLBHnl3jUNkIiKS/j/ehN6ducy7kb3TVk95vyxCMlM mmEjf4e/HgKk2fCi6vASBQ1j9+Q+gyOBNcNu6kVw= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id D8F2A43F85 for ; Fri, 27 Sep 2024 15:34:10 +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=YTeKs0hJ; dkim-atps=neutral Received: from s.wfbtzhsv.outbound-mail.sendgrid.net (s.wfbtzhsv.outbound-mail.sendgrid.net [159.183.224.104]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 6052C43EE6 for ; Fri, 27 Sep 2024 15:33:59 +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=mXhJRiSfo3U9qXq0O8doWRspKwD6KwL+kJb7vDoz0vk=; b=YTeKs0hJkhShb+W7tgoJPrDFz5PuUV7toZk7BZ70n2ibKU7kTT4cxQDzcRCy68Znw6b0 PMr/98IJl9riYL70usdhSw4dWZ4pRfLsvjH8b7A3R5X00l09pwrh+uw6WWwPIhtMhQSkTl jfy1D4vMWfxu0+06cqyxHLr8NDBQpKsQUAruw0IbalIGZlp8ZXf6OQARG/zLn6CY5AUOsJ /sprw/kSSv0TOnNMVN1CUL6eRGUhNwm673CxQkT8kI2e9jzH2T2G/EYPWp/WAYYx/YnX/f EnbORKe+hq/vTJUsuNm1qZhUA3Necs4RIygA5CSQV+P8jwN1yYCEOK1Z11g577hg== Received: by recvd-76b48cd7f5-qjx7k with SMTP id recvd-76b48cd7f5-qjx7k-1-66F6D066-17 2024-09-27 15:33:58.446485465 +0000 UTC m=+1287386.675116997 Received: from herokuapp.com (unknown) by geopod-ismtpd-30 (SG) with ESMTP id XDqoXDTXQ-iqtSfVEb7cBw for ; Fri, 27 Sep 2024 15:33:58.430 +0000 (UTC) Date: Fri, 27 Sep 2024 15:34:16 +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: 95958 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax0K1AcqLicd4u8wFjK6O9=2Fk65ec9np?= =?us-ascii?Q?iCJq8x0s=2FfzlNVAtg5=2FLVU4=2FzyRluI8MVsxYv8S?= =?us-ascii?Q?ACbwvGfrYnqykIfJ7LtVO7IG013jsqg1R3++9+6?= =?us-ascii?Q?3gON=2FO+pGrFhQHi6RfFs6eO48AYIpY8WabOfVb+?= =?us-ascii?Q?J=2F0tWWtqmUC3asnLsPmULHf9QQ=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: NAZUDNBXCRM6V3LHAF27H5M6MUDQLWAE X-Message-ID-Hash: NAZUDNBXCRM6V3LHAF27H5M6MUDQLWAE 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:119323] [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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Issue #20714 has been updated by Eregon (Benoit Daloze). deivid (David Rodr=EDguez) wrote in #note-14: > I think this would affect both Bundler and non Bundler usages. Currently = the warnings recommends to install the gem from RubyGems in non Bundler con= text, that will also be lost in Ruby 3.4 for gems like `csv`. It correctly doesn't warn when not using Bundler, since it remains a bundle= d gem so it can be required like any other bundled gem: ``` $ ruby -ve 'require "csv"' =20 ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux] $ touch Gemfile $ bundle exec ruby -ve 'require "csv"' ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux] -e:1: warning: csv was loaded from the standard library, but will no longer= be part of the default gems starting from Ruby 3.4.0. You can add csv to your Gemfile or gemspec to silence this warning. ``` (and it's the same (no warning) if some gem requires `csv` and is used not = under Bundler). ---------------------------------------- Bug #20714: Handle optional dependencies in `bundled_gems.rb` https://bugs.ruby-lang.org/issues/20714#change-109939 * 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 i= f it is. The way to accomplish that right now seems to be by setting `$VERBOSE =3D n= il` and resetting it later again to not bother the user with the warning ab= out the gem. However, this has the effect of silencing the warning about ot= her gems as well, that may not be prepared about the bundling.=20 >>From `ruby/reline` for example: https://github.com/ruby/reline/blob/c90f08f= 7e308d2f1cdd7cfaf9939fe45ce546fd2/lib/reline/terminfo.rb#L1-L15 Or the `logging` gem: https://github.com/TwP/logging/blob/df41715364f7eb8c6= 5098cd3c3316677ef1f3784/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 --=20 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.rub= y-lang.org/