Re: plugin dependencies

James Adam
Sun, 14 Oct 2007 17:31:03 -0000

On 10/12/07, Michael Koziarski <michael@koziarski.com>
wrote:
> Of these two 9793 is definitely something I''m more comfortable
with,
> but I''m not sure the problems we''re setting out to solve?

The patches have one major aim, and that is to side-step the need for any
"plugin dependency" mechanism. So, for those developers who need to
work with classes defined in another plugin, it becomes less necessary
for them to have to carefully manage load order.

So, to directly answre your question: the *problem* is people asking
for a plugin dependency management mechanism, and the *solution* is to
change the way that plugins are managed in Rails to remove that need
for the large majority of developers.

The second patch also aims to solve this problem, but additionally
refactors the plugin loading mechanism into a clearer set of classes
and objects, to make it more testable, flexible and easier to enhance
in the future.

As I mentioned in the email and the ticket notes, because #9793 is
*far* more conservative, I would expect it to be the preference of
Rails Core. However, I can''t help but feel that eventually (as more
things move out from Rails into plugins), plugin loading code that is
clear, more obvious and transparent will only make that easier. That
was the aim of #9795.

Again, I understand that it''s the nature of the core committers to
apply only the smallest patch to get the desired behaviour, but I
really think that it''s worth expending a bit more effort to get this
key aspect of Rails right sooner rather than later - be that via
#9795, or some other mechanism to make the plugin loading mechanism
clearer and more obvious. I''m happy to discuss this further via
IRC/Campfire/Email :)

Hope that explains it,

- james

--
* J *
  ~