The npm peerDependency option is explicitly for extensions/plugins that
depend on other extensions. Ie, a jQuery plugin that requires another
jQuery plugin to also be loaded (a peer). This is the inter-extension
dependency problem that was being discussed, as I understand it. (I could
be wrong of course.)
--scott
On Jul 22, 2013 2:25 PM, "Jeroen De Dauw" <jeroendedauw(a)gmail.com> wrote:
Hey,
Regardless, the question is: can composer help? It appears that it can:
Yeah, and we've already done most of the steps to make this work for
extensions in core. If you got a MW install, you can already install
Wikibase (together with all its dependencies), though its going to leave
you with a modified composer.json.
The solution proposed by Hashar in some other thread is to have a
"MediaWiki installation" package, which just contains a composer.json file
with core in it, where people can add dependencies, and then install.
Before that will work, we'll need to get rid of "global scope assumptions"
in all core files. For instance, WebStart.php has globals in it, accessed
without specifying they are globals. This will break when included via
Composer, as it will not do so in global scope.
This global scope problem is also present in pretty much all MediaWiki
extensions, except for Wikibase and its libraries, where it was fixed in
part to not break when used via Composer. This means we will not be able to
do things in core and have extensions automatically work. (Unless you do
some kind of hack where you promote all variables in the current scope to
global scope, though I suspect we do not want to do this :D).
--scott (who will attempt to ignore future non-technical posts on this
thread)
That is a good explicit rule. Thanks, I'll follow it as well.
Cheers
--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil. ~=[,,_,,]:3
--
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l