resourceloader: Remove remnants of "dependencies as a function"
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 23 Apr 2018 18:47:59 +0000 (19:47 +0100)
committerCatrope <roan@wikimedia.org>
Thu, 3 May 2018 22:19:20 +0000 (22:19 +0000)
commit2f173f78ed721df454599cf5871754bbf133c8a9
treec171d1b745533a3a0b7482972a1145d733d05806
parentb0c8b65321fcbfeef8595ac835c28dc08094fa6a
resourceloader: Remove remnants of "dependencies as a function"

This hasn't been used in a while, at least two years from what
I could find. It also doesn't have tests, and numerous paths
that possibly should handle it, don't.

This was originally implemented for TMH as a way to dynamically
change what it loads based on the browser environment.

However, this has been addressed by two other aspects already:

* mw.loader.using() - During development of ResourceLoader, this
  method was unstable for a short while. During that pre-release
  time, dynamic dependencies was added as workaround for TMH.
  It being stable addresses TMH's use case of loading *different*
  modules (with callback) based on environment factors.
  This allows complete mutation of the array passed: remove,
  replace, and add operations. This can be used to completely
  change was a module does based on browser environment,
  e.g. load a decoder for X instead of Y, but places the logic
  in the startup module, which is inefficient.
  TMH has switched long ago to using using() instead.

* 'skipFunction' - Introduced in more recent years, this was
  added to more efficiently address the 'remove' use case.
  E.g. where the 'needs' are consistent between browsers, but
  a subset of the needs may be available natively without
  needing a polyfil. The skipFunction allows once to mark
  a module as "ready" without actually loading anything.
  This has been used for efficient and conditional loading of
  DOM2, JSON and ES5 polyfills. (All of which have been removed
  since, but that's a separate story.)

Bug: T192623
Change-Id: Ia97df72a0c3f0fc0dc917fce0a94213b23db4daa
resources/src/mediawiki/mediawiki.js