On 19 Sep 2007, at 14:02, Michael Koziarski wrote:
>> Sure, and what we've done so far internally is twist things so that >> this isn't the case and we don't have to rely on load order. It would >> be nice not to have to perform those contorsions. > > So for those situations you could use config.plugins = > [:your_first_thing, :all] ? Or am I missing something. Perhaps some mechanism of changing the order config.plugins from within a plugin would be simpler, e.g: Three plugins A, B and C need to be loaded in the order C, A, B as B depends on A & C and A depends on C. In a dependencies.rb within the plugin's top level directory: Plugin A: depends_on :plugin_c Plugin B: depends_on :plugin_a, :plugin_c Plugin C: <empty> The plugin loader would start off with the alphabetical list and then remove and re-insert each plugin depending on it's dependencies. e.g: Initial: [:plugin_a, :plugin_b, :plugin_c] A/deps : [:plugin_b, :plugin_c, :plugin_a] # A re-inserted after C B/deps : [:plugin_c, :plugin_a, :plugin_b] # B re-inserted after A C/deps : [:plugin_c, :plugin_a, :plugin_b] # No changes I'm sure there's some situation which wouldn't work but at least it help reduce the need to manually specify config.plugins. Andrew White --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
