Re: Unnecessary exception raised in AS::Dependencies.load_missing_constant

George
2010-02-15T02:20:37Z

Perhaps Nick Seckar remembers: http://dev.rubyonrails.org/changeset/4779
Corresponding git commit: 2b37d59976268013b7e518e5af244947f688d315

Something to do with anonymous modules, I guess.  The commit message
doesn''t
explain why the raise is necessary, though--tests run fine if you revert the
change to the double-load test case, and remove the raise.

- George.

On Sun, Feb 14, 2010 at 8:32 PM, Yehuda Katz <wycats@gmail.com> wrote:

> What I''d like to understand is what the various cases are that
could
> trigger this branch. In particular, I''m interested in
understanding the
> cases without reference to ActiveRecord (which it looks like you and others
> have started to do).
>
> It seems reasonable to remove the exception, but I''d like to see
what the
> original case was that caused the exception to be added in the first place.
> Presumably, it was added in order to catch a common (but infuriating) case
> of some kind.
>
> Any thoughts?
>
> Yehuda Katz
> Developer | Engine Yard
> (ph) 718.877.1325
>
>
>
> On Sun, Feb 14, 2010 at 4:46 PM, Ryan Kinderman
<ryan@kinderman.net>wrote:
>
>> There seems to be a bug in Rails dependency auto-loading logic that is
>> detailed here:
>>
>>
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2283
>>
>> Andrew White created the issue in March of 2009, and it continues to
>> be an issue despite recent Rails 3 commits.  A number of patches have
>> been submitted, and there''s a healthy discussion that has been
going
>> on for a while, but we''re sort of at a dead-end.
>>
>> We  need input from someone that is involved in or deeply
>> knowledgeable of the current and/or planned future state of the
>> ActiveSupport dependency loading logic + ActiveRecord type name
>> resolution logic.
>>
>> Please, if you are "in the know", we''d love for you
to take a look at
>> what we''ve found so far, and suggest how we should move
forward, or
>> provide us with a sense of where things are going with the code
>> involved in fixing the bug.
>>
>> Thanks
>>
>>
>> Ryan Kinderman
>> http://kinderman.net
>>
>> --
>> You received this message because you are subscribed to the Google
Groups
>> "Ruby on Rails: Core" group.
>> To post to this group, send email to rubyonrails-core@googlegroups.com.
>> To unsubscribe from this group, send email to
>>
rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-core?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> To unsubscribe from this group, send email to
>
rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.