resourceloader: Remove redundant filter() in mw.load.load()
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 9 Apr 2019 03:06:38 +0000 (04:06 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 9 Apr 2019 19:19:53 +0000 (19:19 +0000)
commitd059dffa289b0933037c57919d49bb4f64bd0457
treef83f215b70a68bbe50febda877c613e1ee7d6293
parentd793a2039ed119b474cf1803ea9e774d911684cd
resourceloader: Remove redundant filter() in mw.load.load()

This was added for T36853, but never worked and wasn't needed
because other parts of the commit for that task did the work
already (I guess I was trying both ways and ended up submitting
both).

* The inline comment claims to remove unknown modules,
  but doesn't actually. Unknown modules would yield state `null`,
  which is not filtered out. They are actually filtered out
  by resolveStubbornly() and sortDependencies().

* The inline comment claims to filter out modules we tried
  previously and were already known to fail.
  This would work, if there were modules in such state, but
  that never happens at this stage because load() is the first
  thing on the page requesting any modules. Nothing notable
  happened before that. If this were to change in the future,
  or in case of user scripts calling mw.loader.load() directly
  with invalid module names, we're still covered by enqueue()
  and again by mw.loader.work() - both of which make sure we
  don't re-request or retry modules, by filtering down to
  only modules in the 'registered' state.

Change-Id: I3b9f1a13379ad41aeabad8111647c0f6eddccdfc
resources/src/startup/mediawiki.js