"Krinkle" changed the status of MediaWiki.r109965 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/109965#c30006

Old Status: new
> New Status: ok

Commit summary for MediaWiki.r109965:

AFT5 - add mediawiki.util dependency for Special page, per r105471. Not sure if 
that fixes anything at this point, since the page is using resource loader 
already, and and loads ext.articleFeedbackv5.dashboard, which has a dependency 
on mediawiki.util as well as jquery.articleFeedbackv5.special already, but it 
doesn't seem to hurt. I'm open to suggestion on this,

Krinkle's comment:

Yep, modules should declare all and only dependencies used directly in the 
scripts listed in the module itself. The <code> 
jquery.articleFeedbackv5.special</code> module contains <code> 
jquery.articleFeedbackv5.special.js</code> which uses <code>mw.util</code> 
several times. So loading the <code> jquery.articleFeedbackv5.special</code> 
requires the presence of the <code>mediawiki.util</code>, which is only 
enforced by doing what this commit adds. Otherwise loading of this module could 
fail.

<blockquote><em>loads ext.articleFeedbackv5.dashboard, which has a dependency 
on mediawiki.util as well as jquery.articleFeedbackv5.special 
already</em></blockquote>
The problem here is that you don't control what is loaded when. One shouldn't 
''depend'' on modules executing in a certain order or combination. The only 
guarantee is the dependency map.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to