From e887da4b922bdc5317cd5fa79a7ef2467b2f5f42 Mon Sep 17 00:00:00 2001 From: lihao <1453238523@qq.com> Date: Wed, 25 Jun 2025 21:00:14 +0800 Subject: [PATCH] load module_static.abc not from 1.1 Har Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICHTVX Signed-off-by: lihao --- ets2panda/driver/build_system/src/build/base_mode.ts | 10 ++++++++++ ets2panda/driver/build_system/src/error_code.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/ets2panda/driver/build_system/src/build/base_mode.ts b/ets2panda/driver/build_system/src/build/base_mode.ts index 8b10894fe9..24f3fed49b 100644 --- a/ets2panda/driver/build_system/src/build/base_mode.ts +++ b/ets2panda/driver/build_system/src/build/base_mode.ts @@ -681,6 +681,9 @@ export abstract class BaseMode { if (!(moduleInfo.moduleType === OHOS_MODULE_TYPE.HAR && moduleInfo.byteCodeHar)) { continue; } + if (moduleInfo.language === LANGUAGE_VERSION.ARKTS_1_1) { + continue; + } if (!moduleInfo.abcPath) { const logData: LogData = LogDataFactory.newInstance( ErrorCode.BUILDSYSTEM_ABC_FILE_MISSING_IN_BCHAR, @@ -689,6 +692,13 @@ export abstract class BaseMode { this.logger.printError(logData); continue; } + if (!fs.existsSync(moduleInfo.abcPath)) { + const logData: LogData = LogDataFactory.newInstance( + ErrorCode.BUILDSYSTEM_ABC_FILE_NOT_EXIST_IN_BCHAR, + `${moduleInfo.abcPath} does not exist. ` + ); + this.logger.printErrorAndExit(logData); + } this.abcFiles.add(moduleInfo.abcPath); } } diff --git a/ets2panda/driver/build_system/src/error_code.ts b/ets2panda/driver/build_system/src/error_code.ts index 4271e4086b..85cb2ea42e 100644 --- a/ets2panda/driver/build_system/src/error_code.ts +++ b/ets2panda/driver/build_system/src/error_code.ts @@ -41,4 +41,5 @@ export enum ErrorCode { BUILDSYSTEM_INTEROP_SDK_NOT_FIND = '11410020', BUILDSYSTEM_INIT_ALIAS_CONFIG_FAILED = '11410021', BUILDSYSTEM_PLUGIN_ALIAS_CONFIG_PARSING_FAIL = '11410022', + BUILDSYSTEM_ABC_FILE_NOT_EXIST_IN_BCHAR = '11410023' } -- Gitee