From 1bdbfcf51fb371efbe65af6b6f5cfa88272a623d Mon Sep 17 00:00:00 2001 From: dongchao Date: Mon, 16 Jun 2025 22:29:22 +0800 Subject: [PATCH] Avoid collecting unexist files in mixed scene Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICG6N3 Signed-off-by: dongchao Change-Id: Ibff99cf45f80175e8ffba22a5575bd4ca1de822e --- ets2panda/driver/build_system/src/build/base_mode.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ets2panda/driver/build_system/src/build/base_mode.ts b/ets2panda/driver/build_system/src/build/base_mode.ts index 99fad43361..16ace8bf34 100644 --- a/ets2panda/driver/build_system/src/build/base_mode.ts +++ b/ets2panda/driver/build_system/src/build/base_mode.ts @@ -491,6 +491,11 @@ export abstract class BaseMode { processed.add(currentFile); (this.dependencyFileMap?.dependants[currentFile] || []).forEach(dependant => { + // For the 1.1 declaration file referenced in dynamicPaths, if a path is detected as non-existent, it will be skipped. + const isFileExist = fs.existsSync(dependant); + if (!isFileExist) { + return; + } if (!compileFiles.has(dependant) && !processed.has(dependant)) { queue.push(dependant); } -- Gitee