From 9d2c4f71db3920f729df224e2f2f5e9da5516f2e Mon Sep 17 00:00:00 2001 From: Anton Usmansky Date: Wed, 27 Apr 2016 14:22:02 +0300 Subject: [PATCH 1/2] All make platforms should use one instance of shared resources --- lib/magic-helper.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/magic-helper.js b/lib/magic-helper.js index 6fc09e9..af3fb8e 100644 --- a/lib/magic-helper.js +++ b/lib/magic-helper.js @@ -252,6 +252,12 @@ MagicHelper.prototype._buildTargets = function (toBuild, nodes, targets) { return makePlatform.init(root) .then(function () { + // Используем sharedResources основной make-платформы, если она была проинициализирована + var sharedResources = baseMakePlatform.getSharedResources(); + if (sharedResources) { + makePlatform._sharedResources = sharedResources; + } + if (useCache) { // Используем кэш основной make-платформы makePlatform._cacheStorage = baseMakePlatform._cacheStorage; From a2f8eafa0c69e12e24580d97a1ce3a48f04f0fe7 Mon Sep 17 00:00:00 2001 From: Anton Usmansky Date: Fri, 13 May 2016 18:11:26 +0300 Subject: [PATCH 2/2] Force drop cache if cache shouldn't be used --- lib/magic-helper.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/magic-helper.js b/lib/magic-helper.js index af3fb8e..7320a2c 100644 --- a/lib/magic-helper.js +++ b/lib/magic-helper.js @@ -261,6 +261,8 @@ MagicHelper.prototype._buildTargets = function (toBuild, nodes, targets) { if (useCache) { // Используем кэш основной make-платформы makePlatform._cacheStorage = baseMakePlatform._cacheStorage; + } else { + makePlatform.dropCache(); } // Используем логгер основной make-платформы