Page MenuHomePhabricator

Deprecate then remove jquery.async module
Closed, ResolvedPublic


This is an ancient that library that was introduced before 2010, and hasn't been touched since. It had one usage in WikiEditor where it iterated over queued up toolbar init functions asynchronously, which was unnecessary, and could also be achieved with promises.

Issues (fixed)

$ mwgrep "jquery.async"
commonswiki         MediaWiki:WatchlistMessageCreator.js

(total: 1, shown: 1)
$ mwgrep "eachAsync"
bnwikibooks         MediaWiki:Gadget-Special characters.js
commonswiki         MediaWiki:WatchlistMessageCreator.js
enwikibooks         MediaWiki:Common.js/Toolbox.js
enwikibooks         MediaWiki:Gadget-Special characters.js

(total: 4, shown: 4)
$ mwgrep "whileAsync"

(total: 0, shown: 0)


  • Deprecate in MW 1.33
  • Remove in MW 1.34.

See T202154: Audit modules 2018: Reduce registry overhead

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 16 2018, 12:55 PM

Change 474167 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/LiquidThreads@master] Remove unused module jquery.async

Change 474168 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/WikiEditor@master] Make jQuery.async loop synchronous

(cc @Catrope who may remember why it was needed in WikiEditor?)

Change 474170 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/core@master] Mark jquery.async as deprecated

TheDJ added a subscriber: TheDJ.EditedNov 16 2018, 3:13 PM

lol, i was looking at this only yesterday ;)

I'm assuming this had something to do with the deferred loading. You'd want that doneinitialsections after the deferred loading happened. If i take a bit more time i can probably figure out where this was coming from.

Change 474167 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Remove unused module jquery.async

Change 474168 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Make jQuery.async loop synchronous

Change 474170 merged by jenkins-bot:
[mediawiki/core@master] Mark jquery.async as deprecated

Jony added a subscriber: Jony.Dec 2 2018, 5:32 AM
Krinkle triaged this task as Medium priority.Mar 5 2019, 11:33 PM
Krinkle updated the task description. (Show Details)Mar 6 2019, 12:02 AM

(To be removed in MW 1.34.)

I was about to file a new task for the same purpose.

It was added to MediaWiki in 2010 as part of the merge commit that added ResourceLoader. It has not been upgraded since. The plugin itself was last updated in 2008.

The module does not appear to be used anywhere in Gerrit, and only mentioned 1 outside Gerrit in repos indexed by Code search (in a SemanticMediaWiki repository that already has its own copy of the plugin).

I'm recommending we remove this plugin as it is not used anywhere, is unmaintained, and doesn't have a clear use case for why it would ship with core and be registered on every page load.

Source code in MediaWiki:

I was unable to find an authoritative source for the module. The author did not publish it in a version controlled manner (e.g. not on GitHub or some other repository). And the official website ( links to an unversioned file that is slightly different from ours (appears to be older than the copy we have, huh!)

A few more mwgreps. Specifically, to include a search for the page Gadgets-definition (which isn't a *.js page, hence not included by default). Anyway, no matches there either, so all good!

I've gone ahead and fixed MediaWiki:WatchlistMessageCreator.js as I'm a gadget maintainer on commonswiki.

That leaves no further matches a site-wide scripts.

krinkle at mwmaint1002.eqiad.wmnet in ~
$ mwgrep jquery.async
(total: 0)

$ mwgrep --etitle 'Gadgets-definition' jquery.async
(total: 0)
Krinkle changed the task status from Open to Stalled.Mar 28 2019, 7:54 PM
Krinkle lowered the priority of this task from Medium to Low.
Krinkle updated the task description. (Show Details)
In T209699#5143301, @D3r1ck01 wrote:

Per codesearch, only Semantic MW still uses this:

But that's their own copy: "ext.jquery.async" instead of "jQuery.async". Shouldn't be a problem for this ticket.

Thanks for confirming @TheDJ. In that case, removal can commence but the ticket is stalled for now, anything blocking it?

Krinkle changed the task status from Stalled to Open.May 9 2019, 4:16 PM

Change 506856 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] resources: Drop jquery.async, deprecated since 1.33

Change 506856 merged by jenkins-bot:
[mediawiki/core@master] resources: Drop jquery.async, deprecated since 1.33

Krinkle closed this task as Resolved.May 13 2019, 9:30 PM
Krinkle claimed this task.
Krinkle removed a project: Patch-For-Review.
Krinkle updated the task description. (Show Details)
Krinkle added a project: Performance-Team.