ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:69132] [Ruby trunk - Feature #11140] [Open] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
@ 2015-05-12  0:24 ` tenderlove
  2015-05-12  0:46 ` [ruby-core:69135] [Ruby trunk - Feature #11140] " merch-redmine
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: tenderlove @ 2015-05-12  0:24 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been reported by Aaron Patterson.

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69135] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
  2015-05-12  0:24 ` [ruby-core:69132] [Ruby trunk - Feature #11140] [Open] Allow rubygems' `require` to handle `autoload` calls tenderlove
@ 2015-05-12  0:46 ` merch-redmine
  2015-05-12  3:11 ` [ruby-core:69139] " nobu
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: merch-redmine @ 2015-05-12  0:46 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Jeremy Evans.


Considering #5653, 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.

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.

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52383

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69139] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
  2015-05-12  0:24 ` [ruby-core:69132] [Ruby trunk - Feature #11140] [Open] Allow rubygems' `require` to handle `autoload` calls tenderlove
  2015-05-12  0:46 ` [ruby-core:69135] [Ruby trunk - Feature #11140] " merch-redmine
@ 2015-05-12  3:11 ` nobu
  2015-05-14  7:29 ` [ruby-core:69188] " matz
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nobu @ 2015-05-12  3:11 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Nobuyoshi Nakada.

Description updated

It sounds reasonable as `-r` option also calls `Kernel#require` method now.

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52387

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69188] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-05-12  3:11 ` [ruby-core:69139] " nobu
@ 2015-05-14  7:29 ` matz
  2015-05-15  6:43 ` [ruby-core:69202] [Ruby trunk - Feature #11140] [Assigned] " usa
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: matz @ 2015-05-14  7:29 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Yukihiro Matsumoto.


Accepted.  Could you apply the patch, Aaron?

Matz.


----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52445

* Author: Aaron Patterson
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69202] [Ruby trunk - Feature #11140] [Assigned] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-05-14  7:29 ` [ruby-core:69188] " matz
@ 2015-05-15  6:43 ` usa
  2015-05-15 19:05 ` [ruby-core:69205] [Ruby trunk - Feature #11140] " tenderlove
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: usa @ 2015-05-15  6:43 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Usaku NAKAMURA.

Status changed from Closed to Assigned
Assignee set to Aaron Patterson

Aaron, this commit breaks some tests on `ruby/test_require.rb`.
Check [RubyCI](http://rubyci.org/).

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52459

* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69205] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2015-05-15  6:43 ` [ruby-core:69202] [Ruby trunk - Feature #11140] [Assigned] " usa
@ 2015-05-15 19:05 ` tenderlove
  2015-05-16  0:12 ` [ruby-core:69209] " nobu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: tenderlove @ 2015-05-15 19:05 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Aaron Patterson.


Usaku NAKAMURA wrote:
> Aaron, this commit breaks some tests on `ruby/test_require.rb`.
> Check [RubyCI](http://rubyci.org/).

@Usa I'm looking in to it.  It seems to be a bug with looking up activated features during autoload.  :(

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52461

* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69209] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2015-05-15 19:05 ` [ruby-core:69205] [Ruby trunk - Feature #11140] " tenderlove
@ 2015-05-16  0:12 ` nobu
  2015-05-18  8:50 ` [ruby-core:69221] " nobu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nobu @ 2015-05-16  0:12 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Nobuyoshi Nakada.


Removed that garbage.

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52463

* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69221] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2015-05-16  0:12 ` [ruby-core:69209] " nobu
@ 2015-05-18  8:50 ` nobu
  2015-06-12 15:09 ` [ruby-core:69553] " usa
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: nobu @ 2015-05-18  8:50 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Nobuyoshi Nakada.


Since this commit `TestAutoload#test_threaded_accessing_constant` continuously fails on some Linux distributions.
e.g.: http://rubyci.blob.core.windows.net/ubuntu1404/ruby-trunk/log/20150514T220002Z.fail.html.gz

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52476

* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:69553] [Ruby trunk - Feature #11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2015-05-18  8:50 ` [ruby-core:69221] " nobu
@ 2015-06-12 15:09 ` usa
  2019-01-10  0:26 ` [ruby-core:90959] [Ruby trunk Feature#11140] " tenderlove
  2019-03-23  7:48 ` [ruby-core:91954] " hsbt
  10 siblings, 0 replies; 11+ messages in thread
From: usa @ 2015-06-12 15:09 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by Usaku NAKAMURA.


Any updates?

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-52887

* Author: Aaron Patterson
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:90959] [Ruby trunk Feature#11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2015-06-12 15:09 ` [ruby-core:69553] " usa
@ 2019-01-10  0:26 ` tenderlove
  2019-03-23  7:48 ` [ruby-core:91954] " hsbt
  10 siblings, 0 replies; 11+ messages in thread
From: tenderlove @ 2019-01-10  0:26 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by tenderlovemaking (Aaron Patterson).


Is this still failing?  I don't see it on RubyCI.org

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-76165

* Author: tenderlovemaking (Aaron Patterson)
* Status: Assigned
* Priority: Normal
* Assignee: tenderlovemaking (Aaron Patterson)
* Target version: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:91954] [Ruby trunk Feature#11140] Allow rubygems' `require` to handle `autoload` calls
       [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
                   ` (9 preceding siblings ...)
  2019-01-10  0:26 ` [ruby-core:90959] [Ruby trunk Feature#11140] " tenderlove
@ 2019-03-23  7:48 ` hsbt
  10 siblings, 0 replies; 11+ messages in thread
From: hsbt @ 2019-03-23  7:48 UTC (permalink / raw
  To: ruby-core

Issue #11140 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Assigned to Closed

This patch was already applied.

----------------------------------------
Feature #11140: Allow rubygems' `require` to handle `autoload` calls
https://bugs.ruby-lang.org/issues/11140#change-77286

* Author: tenderlovemaking (Aaron Patterson)
* Status: Closed
* Priority: Normal
* Assignee: tenderlovemaking (Aaron Patterson)
* Target version: 
----------------------------------------
Right now, rubygems can't handle calls to `autoload` because `autoload` will directly call `rb_require_safe` rather than sending to `Kernel::require`.

For example:

~~~ruby
class A
  autoload :B, 'a/b' # this is in a different Gem
end
A::B
~~~

The above code won't work because 'a/b' is in a different gem.  I'd like to give rubygems the opportunity to handle requires made through `autoload`.

I've attached a patch that makes the change.


---Files--------------------------------
call_send_on_autoload.diff (1.31 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-23  7:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-11140.20150512002423@ruby-lang.org>
2015-05-12  0:24 ` [ruby-core:69132] [Ruby trunk - Feature #11140] [Open] Allow rubygems' `require` to handle `autoload` calls tenderlove
2015-05-12  0:46 ` [ruby-core:69135] [Ruby trunk - Feature #11140] " merch-redmine
2015-05-12  3:11 ` [ruby-core:69139] " nobu
2015-05-14  7:29 ` [ruby-core:69188] " matz
2015-05-15  6:43 ` [ruby-core:69202] [Ruby trunk - Feature #11140] [Assigned] " usa
2015-05-15 19:05 ` [ruby-core:69205] [Ruby trunk - Feature #11140] " tenderlove
2015-05-16  0:12 ` [ruby-core:69209] " nobu
2015-05-18  8:50 ` [ruby-core:69221] " nobu
2015-06-12 15:09 ` [ruby-core:69553] " usa
2019-01-10  0:26 ` [ruby-core:90959] [Ruby trunk Feature#11140] " tenderlove
2019-03-23  7:48 ` [ruby-core:91954] " hsbt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).