From b9cade754b762257dc5663e11b2dbe3cae752cc4 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Thu, 8 May 2025 23:01:32 +0800 Subject: [PATCH 1/2] comfile abc template Signed-off-by: Keerecles Change-Id: I0c68f6053a5499ab9b244e73d091988d042d0806 --- arkui-plugins/BUILD.gn | 9 +++++++++ koala-wrapper/BUILD.gn | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/arkui-plugins/BUILD.gn b/arkui-plugins/BUILD.gn index a262ea4c0..ef1316286 100755 --- a/arkui-plugins/BUILD.gn +++ b/arkui-plugins/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/ohos.gni") +import("//build/config/components/ets_frontend/ets2abc_config.gni") npm_path = "//prebuilts/build-tools/common/nodejs/current/bin/npm" @@ -41,3 +42,11 @@ ohos_copy("ui_plugin") { subsystem_name = "developtools" part_name = "ace_ets2bundle" } + +ohos_copy("ohos_ets_ui_plugins") { + deps = [ ":gen_ui_plugins" ] + sources = [ rebase_path("$target_gen_dir") ] + outputs = [ ohos_ets_ui_plugins_path ] + subsystem_name = "developtools" + part_name = "ace_ets2bundle" +} \ No newline at end of file diff --git a/koala-wrapper/BUILD.gn b/koala-wrapper/BUILD.gn index d9ad69899..58807818d 100644 --- a/koala-wrapper/BUILD.gn +++ b/koala-wrapper/BUILD.gn @@ -12,6 +12,7 @@ # limitations under the License. import("//build/ohos.gni") +import("//build/config/components/ets_frontend/ets2abc_config.gni") npm_path = "//prebuilts/build-tools/common/nodejs/current/bin/npm" @@ -43,3 +44,11 @@ ohos_copy("ets2panda_koala_wrapper") { subsystem_name = "developtools" part_name = "ace_ets2bundle" } + +ohos_copy("ohos_ets_koala_wrapper") { + deps = [ ":gen_sdk_ts_wrapper" ] + sources = [ rebase_path("$target_gen_dir") ] + outputs = [ ohos_ets_koala_wrapper_path ] + subsystem_name = "developtools" + part_name = "ace_ets2bundle" +} \ No newline at end of file -- Gitee From 06d70e93dcaf82524caf85ebfa8a37d6958ec37a Mon Sep 17 00:00:00 2001 From: Ocean Date: Tue, 20 May 2025 20:44:28 +0800 Subject: [PATCH 2/2] Support Isolated Declgen with Plugin API Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/IC906D Reason: In the hope of speeding up compiler process Description: sync plugin api modified in repo ets_frontend Signed-off-by: Ocean Change-Id: Icce470d926805f92787c4cadd6233d4754a6337c --- koala-wrapper/native/src/bridges.cc | 7 ++++--- koala-wrapper/src/Es2pandaNativeModule.ts | 3 ++- koala-wrapper/src/arkts-api/utilities/public.ts | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 5c177990e..ae512bc9f 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -281,12 +281,13 @@ KBoolean impl_IsETSFunctionType(KNativePointer nodePtr) KOALA_INTEROP_1(IsETSFunctionType, KBoolean, KNativePointer) KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputDeclEts, KStringPtr &outputEts, - KBoolean exportAll) + KBoolean exportAll, KBoolean isolated) { auto context = reinterpret_cast(contextPtr); - return GetImpl()->GenerateTsDeclarationsFromContext(context, outputDeclEts.data(), outputEts.data(), exportAll); + return GetImpl()->GenerateTsDeclarationsFromContext(context, outputDeclEts.data(), outputEts.data(), + exportAll, isolated); } -KOALA_INTEROP_4(GenerateTsDeclarationsFromContext, KInt, KNativePointer, KStringPtr, KStringPtr, KBoolean) +KOALA_INTEROP_5(GenerateTsDeclarationsFromContext, KInt, KNativePointer, KStringPtr, KStringPtr, KBoolean, KBoolean) void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, KNativePointer importDeclaration) diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index 3f271657a..ca7b021f4 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -745,7 +745,8 @@ export class Es2pandaNativeModule { config: KPtr, outputDeclEts: String, outputEts: String, - exportAll: KBoolean + exportAll: KBoolean, + isolated: KBoolean ): KPtr { throw new Error('Not implemented'); } diff --git a/koala-wrapper/src/arkts-api/utilities/public.ts b/koala-wrapper/src/arkts-api/utilities/public.ts index 45888cd18..73417b301 100644 --- a/koala-wrapper/src/arkts-api/utilities/public.ts +++ b/koala-wrapper/src/arkts-api/utilities/public.ts @@ -157,6 +157,17 @@ export function setAllParents(ast: AstNode) { global.es2panda._AstNodeUpdateAll(global.context, ast.peer) } -export function generateTsDeclarationsFromContext(outputDeclEts: string, outputEts: string, exportAll: boolean): KInt { - return global.es2panda._GenerateTsDeclarationsFromContext(global.context, passString(outputDeclEts), passString(outputEts), exportAll) -} \ No newline at end of file +export function generateTsDeclarationsFromContext( + outputDeclEts: string, + outputEts: string, + exportAll: boolean, + isolated: boolean +): KInt { + return global.es2panda._GenerateTsDeclarationsFromContext( + global.context, + passString(outputDeclEts), + passString(outputEts), + exportAll, + isolated + ); +} -- Gitee