From 8cc47409d73afdd675b64373417f950a296be567 Mon Sep 17 00:00:00 2001 From: chenqy930 Date: Fri, 20 Jan 2023 12:28:38 +0800 Subject: [PATCH] Fix unconsistent abc in ts mode Signed-off-by: chenqy930 Change-Id: Id9adf8a0e2196dbe60ad22140f616e2f96d06597 --- compiler/src/gen_abc_plugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/src/gen_abc_plugin.ts b/compiler/src/gen_abc_plugin.ts index 758ab7d96..2c82d4440 100644 --- a/compiler/src/gen_abc_plugin.ts +++ b/compiler/src/gen_abc_plugin.ts @@ -1142,6 +1142,9 @@ function copyModuleFileCachePathToBuildPath(): void { mkdirsSync(path.dirname(protoFilePath)); let entriesInfo: string = ''; moduleInfos = removeDuplicateInfo(moduleInfos); + moduleInfos.sort((m1: ModuleInfo, m2: ModuleInfo) => { + return m1.tempFilePath < m2.tempFilePath ? 1 : -1; + }); for (let i = 0; i < moduleInfos.length; ++i) { let protoTempPath: string = genProtoFileName(moduleInfos[i].tempFilePath); entriesInfo += `${toUnixPath(protoTempPath)}\n`; -- Gitee