On 24 Mar 2015, at 14:13, Brad Jorsch (Anomie) <[email protected]> wrote:
> 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. > That is accurate. This predates my involvement somewhat, but as a low priority task I've been meaning to abstract this further. However every time I tried it seems to only add infrastructure without added value. The terminology and comments around it could do with improvement. But abstracting the implementation away from using load.php?modules= and Module subclasses in PHP wouldn't improve it. -- Krinkle
_______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
