Page MenuHomePhabricator

Remove $wgIncludeLegacyJavaScript
Open, Stalled, LowPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 24 2016, 8:50 PM

Change 277475 had a related patch set uploaded (by Jforrester):
[DO NOT MERGE] Drop deprecated $wgIncludeLegacyJavaScript option

https://gerrit.wikimedia.org/r/277475

Restricted Application added a subscriber: Luke081515. · View Herald TranscriptMar 31 2016, 7:11 PM
Restricted Application added a project: Performance-Team. · View Herald TranscriptApr 28 2018, 2:20 AM
Krinkle changed the task status from Open to Stalled.Apr 28 2018, 2:21 AM
D3r1ck01 added a subscriber: D3r1ck01.

Actually, seems there is a patch for review: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/277475 though it seems its still a WIP.

Yes, that patch is also linked by @gerritbot earlier in this task. But, that patch is not currently ready for review. It has a -2, WIP, and is blocked on other work happening first and migration time for users.

The purpose of the "Patch For Review" tag is (I think) mainly to help code reviewers find tasks that have patches for review, for example via workboard query filters. This task should not show up there currently, because there is nothing I can do with it :)

Is T193314 Remove document.write support (deprecated since 1.26) the only remaining blocker here?

https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.base/legacy.wikibits.js still includes some more stuff. Especially import{Script|Stylesheet} are "not quite deprecated yet".

@Jdlrobson The document.write hack is the only part of wikibits.js remaining that we plan to remove but are difficult to do so.

There are other significant parts of it, namely addOnloadHook() and importScript(). However, those are somewhat easier to migrate if and when the time comes.

Note though that in terms of cost, wikibits has been reduced to an absolute minimum. It adds no no http req. It isn't part of the startup module. It doesn't even register a module bundle in the manifest. Instead, it adds ~0.7K to the main mediawiki.base bundle, which is loaded in parallel with other page modules. As such, this is by no means a priority for investment currently.

However T193314 is slightly higher priority in my opinion, because overriding document.write causes general complexity and actually is preventing the fixing of certain bugs we have. See T193314 for more details about that.

Change 277475 abandoned by Krinkle:
Drop deprecated $wgIncludeLegacyJavaScript option

Reason:
Since 2017, the internals of this have significantly changed. Most of the contents of wikibits.js have been removed after deprecation in recent years.

The config variable itself still exists for reasons described on the task, but that's no longer a perf priority.

https://gerrit.wikimedia.org/r/277475