https://bugzilla.wikimedia.org/show_bug.cgi?id=30234

--- Comment #3 from Reedy <[email protected]> 2011-12-27 22:35:40 UTC ---
I suppose this needs to go via mediawiki-l to find out what we need

Like most things in $wgExtensionCredits, accepting an array/string, and the
name of the dependancy MUST be the same as the 'name' of the other one

Depends makes sense per my "This extension cannot function without this other
extenson"

Recommends/Suggested can be nicely merged as being extras

depends and optional would be fairly apparent


Listing dependencies is one thing, there will be work needed

Adding the information (when decided on naming) sooner rather than later should
be fine, and be ignored, so can start going in whenever, for extensions that
have them (SM* etc) can start building it.

Per Olivier, order shouldn't matter, as long as all extensions needed are
loaded after LocalSettings (and then any other files you randomly include, like
Initialise/Common Settings in WMFs case)

An iteration over all extensions would be needed to build the list of loaded
extensions, and while we are at it, get the list of dependencies ("optional" we
don't care about)

Filter the list of dependancies for dupes (or insert so we can't get dupes),
then an array_diff ( array_diff( $needed, $loaded )) against loaded, and if
count > 0

array(2) {
  ["Extension1"]=>
  array(2) {
    [0]=>
    string(10) "Extension2"
    [1]=>
    string(10) "Extension3"
  }
  ["Extension4"]=>
  array(1) {
    [0]=>
    string(10) "Extension2"
  }
}


We can then backwards look at all the extensions that aren't loaded, and pull
out a list of names of which need extensions and come up with a simple list of
dependancies, stopping code execution from going any furthere

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to