From dfff98ccdd8b8910d5300e50b32405cd6da73d40 Mon Sep 17 00:00:00 2001 From: c00513733 Date: Tue, 16 Jan 2024 02:56:45 +0000 Subject: [PATCH] Differentiate cache keys for entry and ohosTest compilation modules Issue: https://gitee.com/openharmony/developtools_ace_ets2bundle/issues/I8WHY4 Signed-off-by: c00513733 Change-Id: Ia6c682324f64483510ab1fba0169bdae1adce430 --- compiler/src/utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/src/utils.ts b/compiler/src/utils.ts index 64aaa297b..4f8d97c7a 100644 --- a/compiler/src/utils.ts +++ b/compiler/src/utils.ts @@ -966,7 +966,13 @@ export function getRollupCacheStoreKey(projectConfig: object): string { } export function getRollupCacheKey(projectConfig: object): string { - let keyInfo: string[] = [projectConfig.entryModuleName, !!projectConfig.widgetCompile]; + let isWidget: string = projectConfig.widgetCompile ? 'widget' : 'non-widget'; + let ohosTestInfo: string = 'non-ohosTest'; + if (projectConfig.testFrameworkPar) { + ohosTestInfo = JSON.stringify(projectConfig.testFrameworkPar); + } + + let keyInfo: string[] = [projectConfig.entryModuleName, isWidget, ohosTestInfo]; return keyInfo.join('#'); } -- Gitee