resourceloader: Reduce severity of unknown page module warning
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 23 Sep 2019 23:47:18 +0000 (00:47 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 24 Sep 2019 00:16:15 +0000 (01:16 +0100)
commit6e117a95316aacb98e5268d2c1682e16e9fc9019
treebf9df6d9cf436e432c3097e8185c56366711fca2
parentf4975bc6de776c8eb06490932329a3c8d657eabd
resourceloader: Reduce severity of unknown page module warning

These are silently skipped and generally no cause for alarm.
For example, when enabling a gadget by default and then
disabling/deleting it, cached HTML will still have it queued,
which is silently skipped and the other queued modules are loaded
just fine.

The same for when merging module bundles where the destination
is already loaded, in such case it is tolerated to let cached
ParserOutput objects still queuing it silently skip it.
Keeping it existent just to avoid a warning isn't particularly
useful and might even obscure problems or give the illusion that
it is still working and providing compatibility (e.g. loading the
new code), which might not be true.

The silent skipping of modules originally did not have any
logging or warning attached to it, it was silent from 2010
to April 2019. In 2017, commit 37df741514 adds a console warning
when a circular dependency is detected.

In April 2019, commit d059dffa2 optimised away this redundant
silent skipping of unknown modules, in favour of re-using the
code for circular dep detection, which did the same thing already,
but with a debug warning. This meant it now showed scary stack
traces when all there's only an stale module ref, which are normal
in RL and generaly nothing to worry about. This was amplified
by Minerva's tracking of client-side errors going beyond just
'global.error' but also listerning to recoverable internal errors
from 'resourceloader.exception', which now included these
debug warnings.

Change-Id: Ie71adbe18e8dbeb661ddb9d7d3d1d0897891d515
resources/src/startup/mediawiki.js
tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js