https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112015-05-12T00:46:02ZRuby Issue Tracking SystemRuby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=523832015-05-12T00:46:02Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul></ul><p>Considering <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: "I strongly discourage the use of autoload in any standard libraries" (Re: autoload will be dead) (Closed)" href="https://bugs.ruby-lang.org/issues/5653">#5653</a>, should we be making any changes to autoload to make it easier to use, if the intention is to remove it in ruby 3.0? I think before any improvements to autoload should be considered, we first need a firm decision from Matz on autoload's future in ruby.</p>
<p>If Matz decides that autoload will stay in ruby, I'm definitely in favor of autoload calling Kernel::require. But if autoload will be removed in ruby 3.0, I don't think we should make changes like this that would make autoload easier to use. That encourages people to use autoload, which will make updating to ruby 3.0 more painful when the time comes.</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=523872015-05-12T03:11:39Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/52387/diff?detail_id=37756">diff</a>)</li></ul><p>It sounds reasonable as <code>-r</code> option also calls <code>Kernel#require</code> method now.</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524452015-05-14T07:29:10Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>Accepted. Could you apply the patch, Aaron?</p>
<p>Matz.</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524582015-05-14T21:58:06ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset r50494.</p>
<hr>
<ul>
<li>
<p>variable.c: Change autoload to call <code>require</code> through Ruby rather<br>
than directly calling <code>rb_require_safe</code>. This allows things like<br>
RubyGems to intercept file loading done though <code>autoload</code>.<br>
[Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Allow rubygems' `require` to handle `autoload` calls (Closed)" href="https://bugs.ruby-lang.org/issues/11140">#11140</a>]</p>
</li>
<li>
<p>test/ruby/test_autoload.rb: Test for change.</p>
</li>
</ul> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524592015-05-15T06:43:26Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>tenderlovemaking (Aaron Patterson)</i></li></ul><p>Aaron, this commit breaks some tests on <code>ruby/test_require.rb</code>.<br>
Check <a href="http://rubyci.org/" class="external">RubyCI</a>.</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524612015-05-15T19:05:15Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>Usaku NAKAMURA wrote:</p>
<blockquote>
<p>Aaron, this commit breaks some tests on <code>ruby/test_require.rb</code>.<br>
Check <a href="http://rubyci.org/" class="external">RubyCI</a>.</p>
</blockquote>
<p><a class="user active user-mention" href="https://bugs.ruby-lang.org/users/9">@usa (Usaku NAKAMURA)</a> I'm looking in to it. It seems to be a bug with looking up activated features during autoload. :(</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524632015-05-16T00:12:06Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Removed that garbage.</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=524762015-05-18T08:50:08Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Since this commit <code>TestAutoload#test_threaded_accessing_constant</code> continuously fails on some Linux distributions.<br>
e.g.: <a href="http://rubyci.blob.core.windows.net/ubuntu1404/ruby-trunk/log/20150514T220002Z.fail.html.gz" class="external">http://rubyci.blob.core.windows.net/ubuntu1404/ruby-trunk/log/20150514T220002Z.fail.html.gz</a></p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=528872015-06-12T15:09:23Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul></ul><p>Any updates?</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=761652019-01-10T00:26:55Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>Is this still failing? I don't see it on RubyCI.org</p> Ruby master - Feature #11140: Allow rubygems' `require` to handle `autoload` callshttps://bugs.ruby-lang.org/issues/11140?journal_id=772862019-03-23T07:48:16Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>This patch was already applied.</p>