From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.1 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id E46FF1F462 for ; Thu, 6 Jun 2019 09:17:24 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 11989120A91; Thu, 6 Jun 2019 18:17:19 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 01CBF12085A for ; Thu, 6 Jun 2019 18:17:15 +0900 (JST) Received: by filter0088p3iad2.sendgrid.net with SMTP id filter0088p3iad2-4571-5CF8DA1C-35 2019-06-06 09:17:16.824880962 +0000 UTC m=+145658.557322299 Received: from herokuapp.com (unknown [34.235.149.35]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id fm8B_nMKQaWUM6RTSRJERg for ; Thu, 06 Jun 2019 09:17:16.744 +0000 (UTC) Date: Thu, 06 Jun 2019 09:17:16 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68477 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15903 X-Redmine-Issue-Author: Eregon X-Redmine-Issue-Assignee: matz 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-SG-EID: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr2FJF+2Nm9JyTVJmDakYL?= =?us-ascii?Q?xhhq=2Ffss252Vudgv2iP6DmIF1VUswc=2FsvqK9wDa?= =?us-ascii?Q?Il4+EEyJJyAkY5Zu9eB1QqeA4GPecWRp3C2et8Z?= =?us-ascii?Q?FcMzfRsnRnLg1Vvguw0=2F3P5R8kz8ahYjWairp7L?= =?us-ascii?Q?1n0CrIWw1Coqi8vZ+i+N8JzJtI4RAwTbXdw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 93000 Subject: [ruby-core:93000] [Ruby trunk Feature#15903] Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15903 has been updated by Eregon (Benoit Daloze). Assignee changed from Eregon (Benoit Daloze) to matz (Yukihiro Matsumoto) mame (Yusuke Endoh) wrote: > However, we can't be too careful to add anything to `Kernel` nowadays. I propose only as a class method, not an instance method, so I think there is literally no chance for conflicts. What's your concern? > At least, I don't want to do that until we receive an actual request to make the method available in production. We very rarely receive this, e.g., even for RubyVM::InstructionSequence which is now used in production (bootsnap). I think it is not a good criteria, it's just too easy to use `RubyVM` in user code. I understand we should have an actual use-case, but we already have since the feature was introduced. It would be useful when wanting to have more control over loading files (e.g., I guess this could be useful in RubyGems), and potentially bootsnap as @byroot just said above. > Currently, I have no reason to move it to `Kernel`, except module design consistency. I think that's a good enough reason on its own. `RubyVM` shouldn't become a random collections of classes & methods of which part of it are MRI-specific and part not, part stable and part not. That's just so messy, so I'd like to fix that. This issue is a trivial fix for I think an obvious case that does not belong under `RubyVM`. > This is just my opinion. It is all right if matz accepted this. OK, I'll assign to him and add to the developer meeting's agenda. ---------------------------------------- Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path https://bugs.ruby-lang.org/issues/15903#change-78377 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: 2.7 ---------------------------------------- RubyVM contains mostly MRI-specific features but `resolve_feature_path` is clearly not MRI-specific. So I propose to move it as a class method of `Kernel`. I think this makes sense given the related `load` and `require` are defined in `Kernel` too. Moreover, moving this method outside `RubyVM` is *necessary* for other Ruby implementations to implement it, and keep the clean separation that `RubyVM` is only defined on MRI (see #15752). So, can I move `RubyVM.resolve_feature_path` to `Kernel.resolve_feature_path`? Do we need to keep the method on RubyVM (and deprecate it), or can we just remove it since anyway API under RubyVM is not stable? cc @mame -- https://bugs.ruby-lang.org/