Page MenuHomePhabricator

Extract out using into wrapper script
Closed, ResolvedPublic


Using the wrapper dev script, the using call should also be pulled into the wrapper. That keeps the main script smaller (and slightly faster) and still allows successful dev uses to be copied (modulo formatting) into the gadget definition.

Event Timeline

Sophivorus changed the task status from Open to Stalled.Oct 25 2016, 4:51 PM
Sophivorus lowered the priority of this task from Low to Lowest.

Needs further explanation.

It is suggesting that there be no mw.loader.using calls in the main script (, and where to put them in general.

There have been changes in this area, but there are currently two such calls.

Under the proposal:

  1. There would be no mw.loader.using in (but 'mediawiki.toolbar' is a special case because it's conditional, and you might want to keep that one).
  1. Instead, they would be either in a developer-only wrapper script (if you want to test while developing without loading ProveIt as a gadget), or (for regular users) at (the way ProveIt-classic is defined with dependencies= and various libraries).

If you test ProveIt in gadget mode, the "developer-only wrapper script" doesn't exist and you can ignore it. As for regular users, defining it in Gadgets-definition probably has performance benefits, since ResourceLoader can optimize the loading.

Change 348792 merged by Sophivorus:
[wikipedia/gadgets/ProveIt@master] Remove unnecessary mw.loader.using call

Sophivorus claimed this task.

All calls to mw.loading.using are now done from the gadget module definition at Commons (except the conditional call when using mediawiki.toolbar).