Hi,
I wonder if it would be possible to add component interdependencies on a
per plugin basis to the loader and subsequently also the plugin
administration page?
Consider the following:
Plugin A provides a set of distinct components, where most of which are
actually required for the plugin to work. In addition, it provides a set
of optional components, some of which are mutually exclusive to the other.
Plugin A
Component 1 (required dependency for all the other components)
Component 2 (required, requires 1)
Component 3 (required, requires 1, 2)
Component 4 (optional, mutually exclusive to Component 5)
Component 5 (optional, mutually exclusive to Component 4)
However, either of Component 4 or 5 is required to make the system work,
with Component 5 providing an alternative implementation for Component 4,
for example authentication.
A look into the loader yields that all the required components defined for
the standard trac are hard coded into the system (required_components).
In addition, inter dependencies between components of a single plugin are
currently not supported.
Introducing such dependencies into the entry_points declaration seems
quite straight forward, provided that such dependencies are only defined
for a single plugin and the components that it provides, and not on a
cross plugin basis. For the latter, standard entry point level
dependencies can be used, for example
my.plugin.Foo=my.plugin:Foo[other.plugin].
The question is though, what notation will be used for this?
A similar approach to standard dependencies, introduced at the key level
my.plugin.Base=my.plugin:Base[other.plugin]
my.plugin.Foo[my.plugin.Base,my.plugin.Bar]=my.plugin:Foo
my.plugin.Bar[my.plugin.Base]=my.plugin:Bar
seems feasible, however, with longer package names and module/class names
thereof, it may become rather unreadable/unmanageable.
A different approach then could use lists, instead of directly entering
the information into the string declaration,e.g.
dependencies =
[("my.plugin.Foo", ["my.plugin.Base", "my.plugin.Bar" ]),
("my.plugin.Bar", ["my.plugin.Base" ])]
The loader must then, on get_plugin_info provide this additional information
to the caller, so that in admin.web_ui.PluginAdminPanel and the template
thereof, that information can be used to auto-select a/o deselect
components of a given plugin, along with the dependency information being
displayed in the component's description.
Would it be possible to integrate such behaviour into a future trac release?
Regards
Carsten
--
Carsten Klein
Mobil +491 577 666 256 5
[email protected]
axn software UG (haftungsbeschränkt)
Wipperfürther Str. 278, 51515 Kürten
Geschäftsführung Carsten Klein
HRB 66732, Gerichtsstand Amtsgericht Bergisch Gladbach
Steuernr. 204/5740/0835, USt-IdNr. DE 266 540 939
Telefon +492 268 801 285, Telefax +492 268 801 285
www.axn-software.de, [email protected]
--
You received this message because you are subscribed to the Google Groups "Trac
Development" 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/trac-dev?hl=en.