resourceloader: Skip modules with circular deps in tree optimiser
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 22 May 2019 18:29:32 +0000 (19:29 +0100)
committerKrinkle <krinklemail@gmail.com>
Thu, 13 Jun 2019 20:11:44 +0000 (20:11 +0000)
commit14547fd9dcde5d1be5252bee62f25ea7d085dff1
treeade035464e8882524b41269d407ca1a4ddc1d797
parentf9ac85a88887de832805b455bd2f3d518c82a723
resourceloader: Skip modules with circular deps in tree optimiser

Either the server needs to omit these from the registry with
state=error output to the client (and server-side error logging),
or it needs to detect them, and transport them unchanged, so that
the existing client-side logic can handle it.

This patch does the latter.

Without the source code change in this patch, the added test case
fails due to "top" and "middle1" then being registered with
an empty array as dependencies.

Bug: T223402
Change-Id: I57502d7c4e434de4737759aed325dd4200ca89bf
autoload.php
includes/resourceloader/ResourceLoaderCircularDependencyError.php [new file with mode: 0644]
includes/resourceloader/ResourceLoaderStartUpModule.php
tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php