Re: Plugin Loading Changes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Plugin Loading Changes

James Adam
This was a problem that we hit with engines too - essentially you
can't control the plugin load order. I think this is probably suits
the Rail's core team philosophy, which I believe to be that plugins
shouldn't depend on other plugins (correct me if this isn't accurate).

For some history:
http://dev.rubyonrails.org/ticket/2723
http://dev.rubyonrails.org/ticket/2757

... and this is exactly why there is an Engines.start command too.
With some kind of plugin dependency mechanism it would be obsolete.

- james

On 12/7/05, Jeremy Evans <[hidden email]> wrote:

> On 12/7/05, Jeremy Kemper <[hidden email]> wrote:
> > Lib dirs are added before any inits are called in 1.1.
> > Could you try on svn trunk?
>
> I did rake freeze_edge and tried:
>
> # in specific_plugin/init.rb
> require 'general_plugin'
> require 'specific_plugin'
>
> and this:
>
> # in specific_plugin/init.rb
> load_plugin 'general_plugin'
> require 'specific_plugin'
>
> Both of which failed. I checked the load path and not all plugin lib
> directories are in it when it loads specific_plugin/init.rb.
>
> This still worked:
>
> # in specific_plugin/init.rb
> load_plugin File.join(RAILS_ROOT, 'vendor', 'plugins', 'general_plugin')
> require 'specific_plugin'
> _______________________________________________
> Rails mailing list
> [hidden email]
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
_______________________________________________
Rails mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails