On Tue, Mar 24, 2015 at 3:09 AM, Krinkle <[email protected]> wrote:

> On 23 Mar 2015, at 13:56, Brad Jorsch (Anomie) <[email protected]>
> wrote:
>
> On Mon, Mar 23, 2015 at 3:08 AM, Krinkle <[email protected]> wrote:
>
>> Nothing is loaded by default.
>>
>> If you make use of interfaces provided by a module, you must add a
>> dependency on that module.
>>
>
> I must have misunderstood something. If all dependencies have to be
> declared then why does ResourcesTest::testIllegalDependencies() explicitly
> complain about 'jquery' and 'mediawiki'?
>
>
> jquery and mediawiki are not modules. They are raw files leveraging parts
> of ResourceLoader to deliver itself
>

Ah, there's the confusion. Despite being in Resources.php in the same data
structure and in the same format as all (other) modules, and being named by
a method named "getStartupModules", and being delivered via the usual
module loader script where they're specified as
"modules=jquery%2Cmediawiki", and generally being referred to as "modules"
in code comments and so on, you don't consider them modules because they're
loaded specially by the bootstrapping "module"[1] and aren't passed to
mw.loader.register().

 [1]: I'm guessing 'startup', implemented by ResourceLoaderStartUpModule,
is not a module either by your definition.


-- 
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to