From 9023aa9529f53de5b1723f1deaaa9d128fa8c2d7 Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Thu, 10 Jul 2025 16:15:30 +0300 Subject: [PATCH 01/11] Add empty string to resolve disambigous signatures Signed-off-by: Tatiana Titova --- .../shopping/entry/src/main/ets/pages/detailPage/detail.ets | 4 ++-- .../shopping/user/src/ets/pages/detailPage/detail.ets | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arkoala-arkts/loader/app/shopping/entry/src/main/ets/pages/detailPage/detail.ets b/arkoala-arkts/loader/app/shopping/entry/src/main/ets/pages/detailPage/detail.ets index aa0eae795..a5892a549 100644 --- a/arkoala-arkts/loader/app/shopping/entry/src/main/ets/pages/detailPage/detail.ets +++ b/arkoala-arkts/loader/app/shopping/entry/src/main/ets/pages/detailPage/detail.ets @@ -361,7 +361,7 @@ export struct Detail { .margin({ top: 5, bottom: 5 }) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { - Text() + Text("") Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { ForEach(this.phoneType, (item: PhoneTypeModel) => { Image(`${item.uri}`) @@ -650,4 +650,4 @@ export struct Detail { .backgroundColor('#10000000') }.hideTitleBar(true) } -} \ No newline at end of file +} diff --git a/arkoala-arkts/shopping/user/src/ets/pages/detailPage/detail.ets b/arkoala-arkts/shopping/user/src/ets/pages/detailPage/detail.ets index c6f873c99..e43f35b1c 100644 --- a/arkoala-arkts/shopping/user/src/ets/pages/detailPage/detail.ets +++ b/arkoala-arkts/shopping/user/src/ets/pages/detailPage/detail.ets @@ -364,7 +364,7 @@ export struct Detail { .margin({ top: 5, bottom: 5 } as Margin) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { - Text() + Text("") Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { ForEach(this.phoneType, (item: PhoneTypeModel) => { Image(`${item.uri}`) -- Gitee From 2f35eb092c42003b48dbabf836ad631dbe1b1701 Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Thu, 10 Jul 2025 17:52:52 +0300 Subject: [PATCH 02/11] Add empty string to resolve disambigous signatures in tests Signed-off-by: Tatiana Titova --- arkoala-arkts/ets-plugin/test/ets/Rewrite.ets | 6 +++--- .../ets-plugin/test/ets/dollar-dollar/components.ets | 4 ++-- .../ets-plugin/test/ets/ets-component-call/ets-call.ets | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arkoala-arkts/ets-plugin/test/ets/Rewrite.ets b/arkoala-arkts/ets-plugin/test/ets/Rewrite.ets index 301cea778..49350193e 100644 --- a/arkoala-arkts/ets-plugin/test/ets/Rewrite.ets +++ b/arkoala-arkts/ets-plugin/test/ets/Rewrite.ets @@ -134,7 +134,7 @@ function looks() { @Component struct StylesExample { build() { - Text() + Text("") .width(17) .looks() } @@ -150,7 +150,7 @@ struct StylesMethodExample { } build() { - Text() + Text("") .width(17) .nice() } @@ -196,7 +196,7 @@ function attributeExtend(n: number, animatable: AnimatableValue) { @Component struct AnimatableExtendExample { build() { - Text() + Text("") .width(17) .attributeExtend(50, new AnimatableValue()) } diff --git a/arkoala-arkts/ets-plugin/test/ets/dollar-dollar/components.ets b/arkoala-arkts/ets-plugin/test/ets/dollar-dollar/components.ets index 3e7cfa06f..14e836df8 100644 --- a/arkoala-arkts/ets-plugin/test/ets/dollar-dollar/components.ets +++ b/arkoala-arkts/ets-plugin/test/ets/dollar-dollar/components.ets @@ -61,5 +61,5 @@ struct DollarDollar { @Builder function builder() { - Text() -} \ No newline at end of file + Text("") +} diff --git a/arkoala-arkts/ets-plugin/test/ets/ets-component-call/ets-call.ets b/arkoala-arkts/ets-plugin/test/ets/ets-component-call/ets-call.ets index 8686b9600..c7feeaa4e 100644 --- a/arkoala-arkts/ets-plugin/test/ets/ets-component-call/ets-call.ets +++ b/arkoala-arkts/ets-plugin/test/ets/ets-component-call/ets-call.ets @@ -27,7 +27,7 @@ export function callBuiltinComponent() { @Builder export function callFunctionWithReservedName() { - Text() + Text("") } @Builder @@ -52,4 +52,4 @@ function main() { Column({ space: 30 }) { Flex({ justifyContent: 30 }) } -} \ No newline at end of file +} -- Gitee From 16292f0280457890d50e35d23ae0e66e34de1087 Mon Sep 17 00:00:00 2001 From: mmorozov Date: Fri, 4 Jul 2025 11:11:40 +0300 Subject: [PATCH 03/11] Fix ani signatures Signed-off-by: mmorozov --- interop/src/cpp/ani/convertors-ani.cc | 10 +++++----- interop/src/cpp/ani/convertors-ani.h | 18 ++++++++--------- interop/src/cpp/vmloader.cc | 28 +++++++++++++-------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/interop/src/cpp/ani/convertors-ani.cc b/interop/src/cpp/ani/convertors-ani.cc index 3352aa826..7373e45d7 100644 --- a/interop/src/cpp/ani/convertors-ani.cc +++ b/interop/src/cpp/ani/convertors-ani.cc @@ -20,7 +20,7 @@ #include "interop-types.h" static const char* callCallbackFromNative = "callCallbackFromNative"; -static const char* callCallbackFromNativeSig = "IJI:I"; +static const char* callCallbackFromNativeSig = "ili:i"; const bool registerByOne = true; @@ -145,11 +145,11 @@ void AniExports::setClasspath(const char* module, const char *classpath) { } static std::map g_defaultClasspaths = { - {"InteropNativeModule", "L@koalaui/interop/InteropNativeModule/InteropNativeModule;"}, + {"InteropNativeModule", "@koalaui.interop.InteropNativeModule.InteropNativeModule"}, // todo leave just InteropNativeModule, define others via KOALA_ETS_INTEROP_MODULE_CLASSPATH - {"TestNativeModule", "L@ohos/arkui/generated/arkts/TestNativeModule/TestNativeModule;"}, - {"ArkUINativeModule", "L@ohos/arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule;"}, - {"ArkUIGeneratedNativeModule", "L@ohos/arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule;"}, + {"TestNativeModule", "@ohos.arkui.generated.arkts.TestNativeModule.TestNativeModule"}, + {"ArkUINativeModule", "@ohos.arkui.generated.arkts.ArkUINativeModule.ArkUINativeModule"}, + {"ArkUIGeneratedNativeModule", "@ohos.arkui.generated.arkts.ArkUIGeneratedNativeModule.ArkUIGeneratedNativeModule"}, }; const std::string& AniExports::getClasspath(const std::string& module) { diff --git a/interop/src/cpp/ani/convertors-ani.h b/interop/src/cpp/ani/convertors-ani.h index 68ba12a03..17529180b 100644 --- a/interop/src/cpp/ani/convertors-ani.h +++ b/interop/src/cpp/ani/convertors-ani.h @@ -331,16 +331,16 @@ struct InteropTypeConverter { static ani_class string_class = nullptr; static ani_class resource_class = nullptr; if (!double_class) { - CHECK_ANI_FATAL(env->FindClass("Lstd/core/Double;", &double_class)); + CHECK_ANI_FATAL(env->FindClass("std.core.Double", &double_class)); } if (!int_class) { - CHECK_ANI_FATAL(env->FindClass("Lstd/core/Int;", &int_class)); + CHECK_ANI_FATAL(env->FindClass("std.core.Int", &int_class)); } if (!string_class) { - CHECK_ANI_FATAL(env->FindClass("Lstd/core/String;", &string_class)); + CHECK_ANI_FATAL(env->FindClass("std.core.String", &string_class)); } if (!resource_class) { - CHECK_ANI_FATAL(env->FindClass("L@ohos/arkui/generated/resource/Resource;", &resource_class)); + CHECK_ANI_FATAL(env->FindClass("@ohos.arkui.generated.resource.Resource", &resource_class)); } const ani_object valueObj = reinterpret_cast(value); @@ -349,7 +349,7 @@ struct InteropTypeConverter { CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, double_class, &isInstanceOf)); if (isInstanceOf) { static ani_method double_p = nullptr; - if (!double_p) CHECK_ANI_FATAL(env->Class_FindMethod(double_class, "unboxed", ":D", &double_p)); + if (!double_p) CHECK_ANI_FATAL(env->Class_FindMethod(double_class, "unboxed", ":d", &double_p)); ani_double result; CHECK_ANI_FATAL(env->Object_CallMethod_Double(valueObj, double_p, &result)); return KLength{ 1, (KFloat) result, 1, 0 }; @@ -358,7 +358,7 @@ struct InteropTypeConverter { CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, int_class, &isInstanceOf)); if (isInstanceOf) { static ani_method int_p = nullptr; - if (!int_p) CHECK_ANI_FATAL(env->Class_FindMethod(int_class, "unboxed", ":I", &int_p)); + if (!int_p) CHECK_ANI_FATAL(env->Class_FindMethod(int_class, "unboxed", ":i", &int_p)); ani_int result; CHECK_ANI_FATAL(env->Object_CallMethod_Int(valueObj, int_p, &result)); return KLength{ 1, (KFloat) result, 1, 0 }; @@ -377,7 +377,7 @@ struct InteropTypeConverter { CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, resource_class, &isInstanceOf)); if (isInstanceOf) { static ani_method resource_p = nullptr; - if (!resource_p) CHECK_ANI_FATAL(env->Class_FindMethod(resource_class, "id",":D", &resource_p)); + if (!resource_p) CHECK_ANI_FATAL(env->Class_FindMethod(resource_class, "id",":d", &resource_p)); ani_double result; CHECK_ANI_FATAL(env->Object_CallMethod_Double(valueObj, resource_p, &result)); return KLength{ 3, 0, 1, (KInt) result }; @@ -1940,10 +1940,10 @@ void getKoalaANICallbackDispatcher(ani_class* clazz, ani_static_method* method); do { \ ani_env* env = reinterpret_cast(vmContext); \ ani_class errorClass {}; \ - CHECK_ANI_FATAL(env->FindClass("Lescompat/Error;", &errorClass)); \ + CHECK_ANI_FATAL(env->FindClass("escompat.Error", &errorClass)); \ ani_method errorCtor {}; \ CHECK_ANI_FATAL(env->Class_FindMethod(errorClass, "", \ - "Lstd/core/String;Lescompat/ErrorOptions;:V", &errorCtor)); \ + "C{std.core.String}C{escompat.ErrorOptions}:", &errorCtor)); \ ani_string messageObject{}; \ CHECK_ANI_FATAL(env->String_NewUTF8(message, strlen(message), &messageObject)); \ ani_ref undefined{}; \ diff --git a/interop/src/cpp/vmloader.cc b/interop/src/cpp/vmloader.cc index fa6b8000d..bc504e1c5 100644 --- a/interop/src/cpp/vmloader.cc +++ b/interop/src/cpp/vmloader.cc @@ -585,34 +585,34 @@ const AppInfo harnessAppInfo = { #endif #ifdef KOALA_ANI const AppInfo harnessAniAppInfo = { - "L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", + "@koalaui.ets-harness.src.EtsHarnessApplication.EtsHarnessApplication", "createApplication", - "Lstd/core/String;Lstd/core/String;Lstd/core/String;ZI:L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", + "C{std.core.String}C{std.core.String}C{std.core.String}zi:C{@koalaui.ets-harness.src.EtsHarnessApplication.EtsHarnessApplication}", "start", - "JI:J", + "li:l", "enter", - "IIJ:Z", + "iil:z", "emitEvent", - "IIII:Lstd/core/String;", + "iiii:C{std.core.String}", "restartWith", - "Lstd/core/String;:V", + "C{std.core.String}:", "UNUSED", - "I:I" + "i:i" }; const AppInfo aniAppInfo = { - "L@ohos/arkui/Application/Application;", + "@ohos.arkui.Application.Application", "createApplication", - "Lstd/core/String;Lstd/core/String;Lstd/core/String;ZI:L@ohos/arkui/Application/Application;", + "C{std.core.String}C{std.core.String}C{std.core.String}zi:C{@ohos.arkui.Application.Application}", "start", - "JI:J", + "li:l", "enter", - "IJ:Z", + "il:z", "emitEvent", - "IIII:Lstd/core/String;", + "iiii:C{std.core.String}", "UNUSED", - "I:I", + "i:i", "loadView", - "Lstd/core/String;Lstd/core/String;:Lstd/core/String;", + "C{std.core.String}C{std.core.String}:C{std.core.String}", }; #endif -- Gitee From 4095a610a580f1bb3842d27a53caf6408071dfcb Mon Sep 17 00:00:00 2001 From: mmorozov Date: Mon, 14 Jul 2025 14:47:21 +0300 Subject: [PATCH 04/11] Add ANI bind static methods Signed-off-by: mmorozov --- interop/src/cpp/ani/ani.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/interop/src/cpp/ani/ani.h b/interop/src/cpp/ani/ani.h index a171d16ad..0525a1b35 100644 --- a/interop/src/cpp/ani/ani.h +++ b/interop/src/cpp/ani/ani.h @@ -620,6 +620,20 @@ struct __ani_interaction_api { ani_status (*Class_BindNativeMethods)(ani_env *env, ani_class cls, const ani_native_function *methods, ani_size nr_methods); + /** + * @brief Binds static native methods to a class. + * + * This function binds an array of static native methods to the specified class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to which the native methods will be bound. + * @param[in] methods A pointer to an array of static native methods to bind. + * @param[in] nr_methods The number of static native methods in the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_BindStaticNativeMethods)(ani_env *env, ani_class cls, const ani_native_function *methods, + ani_size nr_methods); + /** * @brief Deletes a local reference. * @@ -6235,6 +6249,10 @@ struct __ani_env { { return c_api->Class_BindNativeMethods(this, cls, methods, nr_methods); } + ani_status Class_BindStaticNativeMethods(ani_class cls, const ani_native_function *methods, ani_size nr_methods) + { + return c_api->Class_BindStaticNativeMethods(this, cls, methods, nr_methods); + } ani_status Reference_Delete(ani_ref ref) { return c_api->Reference_Delete(this, ref); -- Gitee From f9c7c85b01d2a262642bc37f9ed0aec46e30ec9a Mon Sep 17 00:00:00 2001 From: wuxiesaber Date: Sat, 19 Jul 2025 14:25:48 +0800 Subject: [PATCH 05/11] adjust number2int in map and set Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICN2J6 Signed-off-by: wuxiesaber Change-Id: Ib36ebf17a202cf4a18b0ffbedc5eb82dde11b133 --- incremental/compat/src/arkts/observable.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/incremental/compat/src/arkts/observable.ts b/incremental/compat/src/arkts/observable.ts index 681891ad9..9ebb97d7e 100644 --- a/incremental/compat/src/arkts/observable.ts +++ b/incremental/compat/src/arkts/observable.ts @@ -595,7 +595,7 @@ class ObservableMap extends Map { return ObservableHandler.find(this) } - override get size(): number { + override get size(): int { this.handler?.onAccess() return super.size } @@ -699,7 +699,7 @@ class ObservableSet extends Set { return new Set(this.elements.keys()).toString() } - override get size(): number { + override get size(): int { this.handler?.onAccess() return this.elements.size } -- Gitee From d3c39bcc20a97d3f219480cbdc262bbae0ee34e9 Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Thu, 17 Jul 2025 09:41:08 +0300 Subject: [PATCH 06/11] Update with new DebugInfo signatures Signed-off-by: Tatiana Titova --- ui2abc/libarkts/native/src/bridges.cc | 21 ++++++++++--------- ui2abc/libarkts/src/Es2pandaNativeModule.ts | 8 +++---- .../arkts-api/peers/Diagnostic.ts | 7 ++++--- .../arkts-api/peers/DiagnosticInfo.ts | 7 ++++--- .../arkts-api/peers/SuggestionInfo.ts | 7 ++++--- 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/ui2abc/libarkts/native/src/bridges.cc b/ui2abc/libarkts/native/src/bridges.cc index 1dad35c6e..63519aefa 100644 --- a/ui2abc/libarkts/native/src/bridges.cc +++ b/ui2abc/libarkts/native/src/bridges.cc @@ -509,7 +509,7 @@ KNativePointer impl_CreateDiagnosticKind(KNativePointer context, KStringPtr& mes } KOALA_INTEROP_3(CreateDiagnosticKind, KNativePointer, KNativePointer, KStringPtr, KInt) -KNativePointer impl_CreateDiagnosticInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, KInt argc) +KNativePointer impl_CreateDiagnosticInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, KInt argc, KNativePointer pos) { const auto _context = reinterpret_cast(context); const auto _kind = reinterpret_cast(kind); @@ -523,12 +523,13 @@ KNativePointer impl_CreateDiagnosticInfo(KNativePointer context, KNativePointer _args[i] = strdup(std::string(reinterpret_cast(argsPtr + position), strLen).c_str()); position += strLen; } - return GetImpl()->CreateDiagnosticInfo(_context, _kind, _args, argc); + auto&& _pos = reinterpret_cast(pos); + return GetImpl()->CreateDiagnosticInfo(_context, _kind, _args, argc, _pos); } -KOALA_INTEROP_4(CreateDiagnosticInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt) +KOALA_INTEROP_5(CreateDiagnosticInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, KNativePointer) KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, - KInt argc, KStringPtr& substitutionCode) + KInt argc, KStringPtr& substitutionCode, KNativePointer range) { const auto _context = reinterpret_cast(context); const auto _kind = reinterpret_cast(kind); @@ -543,9 +544,10 @@ KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer position += strLen; } const auto _substitutionCode = getStringCopy(substitutionCode); - return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode); + const auto _range = reinterpret_cast(range); + return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _range); } -KOALA_INTEROP_5(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, KStringPtr) +KOALA_INTEROP_6(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, KStringPtr, KNativePointer) void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArray argvPtr, KInt argc, KNativePointer pos) @@ -568,15 +570,14 @@ void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArra KOALA_INTEROP_V5(LogDiagnostic, KNativePointer, KNativePointer, KStringArray, KInt, KNativePointer) void impl_LogDiagnosticWithSuggestion(KNativePointer context, KNativePointer diagnosticInfo, - KNativePointer suggestionInfo, KNativePointer range) + KNativePointer suggestionInfo) { const auto _context = reinterpret_cast(context); const auto _diagnosticInfo = reinterpret_cast(diagnosticInfo); const auto _suggestionInfo = reinterpret_cast(suggestionInfo); - const auto _range = reinterpret_cast(range); - GetImpl()->LogDiagnosticWithSuggestion(_context, _diagnosticInfo, _suggestionInfo, _range); + GetImpl()->LogDiagnosticWithSuggestion(_context, _diagnosticInfo, _suggestionInfo); } -KOALA_INTEROP_V4(LogDiagnosticWithSuggestion, KNativePointer, KNativePointer, KNativePointer, KNativePointer) +KOALA_INTEROP_V3(LogDiagnosticWithSuggestion, KNativePointer, KNativePointer, KNativePointer) KInt impl_GenerateStaticDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputPath) { diff --git a/ui2abc/libarkts/src/Es2pandaNativeModule.ts b/ui2abc/libarkts/src/Es2pandaNativeModule.ts index da797b0a9..32d643498 100644 --- a/ui2abc/libarkts/src/Es2pandaNativeModule.ts +++ b/ui2abc/libarkts/src/Es2pandaNativeModule.ts @@ -188,18 +188,18 @@ export class Es2pandaNativeModule { _CreateDiagnosticKind(context: KNativePointer, message: string, type: Es2pandaPluginDiagnosticType): KNativePointer { throw new Error("Not implemented") } - _CreateDiagnosticInfo(context: KNativePointer, kind: KNativePointer, args: string[], argc: number): KNativePointer { + _CreateDiagnosticInfo(context: KNativePointer, kind: KNativePointer, args: string[], argc: number, pos: KNativePointer): KNativePointer { throw new Error("Not implemented") } _CreateSuggestionInfo(context: KNativePointer, kind: KNativePointer, args: string[], - argc: number, substitutionCode: string): KNativePointer { + argc: number, substitutionCode: string, range: KNativePointer): KNativePointer { throw new Error("Not implemented") } _LogDiagnostic(context: KNativePointer, kind: KNativePointer, argv: string[], argc: number, pos: KNativePointer): void { throw new Error("Not implemented") } _LogDiagnosticWithSuggestion(context: KNativePointer, diagnosticInfo: KNativePointer, - suggestionInfo?: KNativePointer, range?: KNativePointer): void { + suggestionInfo?: KNativePointer): void { throw new Error("Not implemented") } _SetUpSoPath(soPath: string): void { @@ -258,4 +258,4 @@ export function initGeneratedEs2panda(): GeneratedEs2pandaNativeModule { // registerNativeModule("InteropNativeModule", NativeModule) loadNativeModuleLibrary("NativeModule", instance) return instance -} \ No newline at end of file +} diff --git a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts index 9b2165ee7..d3069a981 100644 --- a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +++ b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts @@ -32,8 +32,9 @@ export class Diagnostic extends ArktsObject { } static logDiagnosticWithSuggestion(diagnosticInfo: DiagnosticInfo, suggestionInfo: SuggestionInfo, - range: SourceRange): void { - global.es2panda._LogDiagnosticWithSuggestion(global.context, diagnosticInfo.peer, suggestionInfo.peer, range.peer); + range?: SourceRange): void { + console.warn(`Range parameter is not used anymore`) + global.es2panda._LogDiagnosticWithSuggestion(global.context, diagnosticInfo.peer, suggestionInfo.peer); } -} \ No newline at end of file +} diff --git a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts index f708cdebd..cfc3221ca 100644 --- a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +++ b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts @@ -18,16 +18,17 @@ import { global } from '../static/global'; import { KNativePointer } from '@koalaui/interop'; import { DiagnosticKind } from './DiagnosticKind'; import { passStringArray } from '../utilities/private'; +import { SourcePosition } from './SourcePosition'; export class DiagnosticInfo extends ArktsObject { constructor(peer: KNativePointer) { super(peer); } - static create(kind: DiagnosticKind, ...args: string[]): DiagnosticInfo { + static create(kind: DiagnosticKind, pos: SourcePosition, ...args: string[]): DiagnosticInfo { return new DiagnosticInfo( - global.es2panda._CreateDiagnosticInfo(global.context, kind.peer, passStringArray(args), args.length) + global.es2panda._CreateDiagnosticInfo(global.context, kind.peer, passStringArray(args), args.length, pos.peer) ); } -} \ No newline at end of file +} diff --git a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts index 3c0631110..f4b92b374 100644 --- a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts +++ b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts @@ -18,16 +18,17 @@ import { global } from '../static/global'; import { KNativePointer } from '@koalaui/interop'; import { DiagnosticKind } from './DiagnosticKind'; import { passStringArray } from '../utilities/private'; +import { SourceRange } from './SourceRange'; export class SuggestionInfo extends ArktsObject { constructor(peer: KNativePointer) { super(peer); } - static create(kind: DiagnosticKind, substitutionCode: string, ...args: string[]): SuggestionInfo { + static create(kind: DiagnosticKind, substitutionCode: string, range: SourceRange, ...args: string[]): SuggestionInfo { return new SuggestionInfo( - global.es2panda._CreateSuggestionInfo(global.context, kind.peer, passStringArray(args), args.length, substitutionCode) + global.es2panda._CreateSuggestionInfo(global.context, kind.peer, passStringArray(args), args.length, substitutionCode, range.peer) ); } -} \ No newline at end of file +} -- Gitee From eb71e190ebb4d2c9b44b794778c85d12c10cdc62 Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Fri, 18 Jul 2025 12:07:15 +0300 Subject: [PATCH 07/11] Fix import path Signed-off-by: Tatiana Titova --- .../src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts index cfc3221ca..a85fa5991 100644 --- a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +++ b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts @@ -18,7 +18,7 @@ import { global } from '../static/global'; import { KNativePointer } from '@koalaui/interop'; import { DiagnosticKind } from './DiagnosticKind'; import { passStringArray } from '../utilities/private'; -import { SourcePosition } from './SourcePosition'; +import { SourcePosition } from '../../../arkts-api/peers/SourcePosition'; export class DiagnosticInfo extends ArktsObject { constructor(peer: KNativePointer) { -- Gitee From c4f695c61d35517573477559459ee2f9a529964c Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Tue, 22 Jul 2025 10:42:17 +0300 Subject: [PATCH 08/11] Fix logDiagnosticWithSuggestion signature Signed-off-by: Tatiana Titova --- .../libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts index d3069a981..318edb419 100644 --- a/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +++ b/ui2abc/libarkts/src/wrapper-compat/arkts-api/peers/Diagnostic.ts @@ -31,8 +31,7 @@ export class Diagnostic extends ArktsObject { global.es2panda._LogDiagnostic(global.context, kind.peer, passStringArray(args), args.length, pos.peer); } - static logDiagnosticWithSuggestion(diagnosticInfo: DiagnosticInfo, suggestionInfo: SuggestionInfo, - range?: SourceRange): void { + static logDiagnosticWithSuggestion(diagnosticInfo: DiagnosticInfo, suggestionInfo: SuggestionInfo): void { console.warn(`Range parameter is not used anymore`) global.es2panda._LogDiagnosticWithSuggestion(global.context, diagnosticInfo.peer, suggestionInfo.peer); } -- Gitee From db4938bfcf03c14813ca9bc17931fbf48400aed3 Mon Sep 17 00:00:00 2001 From: Tatiana Titova Date: Tue, 22 Jul 2025 15:00:06 +0300 Subject: [PATCH 09/11] Make range parameter optional Signed-off-by: Tatiana Titova --- ui2abc/libarkts/src/Es2pandaNativeModule.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui2abc/libarkts/src/Es2pandaNativeModule.ts b/ui2abc/libarkts/src/Es2pandaNativeModule.ts index 32d643498..2c5920d99 100644 --- a/ui2abc/libarkts/src/Es2pandaNativeModule.ts +++ b/ui2abc/libarkts/src/Es2pandaNativeModule.ts @@ -192,7 +192,7 @@ export class Es2pandaNativeModule { throw new Error("Not implemented") } _CreateSuggestionInfo(context: KNativePointer, kind: KNativePointer, args: string[], - argc: number, substitutionCode: string, range: KNativePointer): KNativePointer { + argc: number, substitutionCode: string, range?: KNativePointer): KNativePointer { throw new Error("Not implemented") } _LogDiagnostic(context: KNativePointer, kind: KNativePointer, argv: string[], argc: number, pos: KNativePointer): void { -- Gitee From be617724d98cbe98c45df8a9966fb385ce8caca6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Tue, 22 Jul 2025 20:17:28 +0300 Subject: [PATCH 10/11] Fix resolveDeferred() Signed-off-by: Vyacheslav Cherkashin --- interop/src/cpp/common-interop.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interop/src/cpp/common-interop.cc b/interop/src/cpp/common-interop.cc index 47cf2f4d8..24cdd5d65 100644 --- a/interop/src/cpp/common-interop.cc +++ b/interop/src/cpp/common-interop.cc @@ -486,7 +486,10 @@ void resolveDeferred(KVMDeferred* deferred, uint8_t* argsData, int32_t argsLengt status = vm->AttachCurrentThread(nullptr, ANI_VERSION_1, &env); CHECK_ANI_FATAL(status); } - status = env->PromiseResolver_Resolve((ani_resolver)deferred->handler, nullptr); + ani_ref undef = nullptr; + status = env->GetUndefined(&undef); + CHECK_ANI_FATAL(status); + status = env->PromiseResolver_Resolve((ani_resolver)deferred->handler, undef); CHECK_ANI_FATAL(status); #endif } -- Gitee From 9ff8da25de16807f2e78528f7fc5a49295309da2 Mon Sep 17 00:00:00 2001 From: Jozsef Koczo Date: Mon, 14 Jul 2025 11:27:57 +0200 Subject: [PATCH 11/11] Remmove catch type annotation Signed-off-by: Jozsef Koczo --- arkoala-arkts/arkui/src/ets/Application.ets | 2 +- ets-tests/ets/pages/provide/ProvideConsumeNoOverride.ets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arkoala-arkts/arkui/src/ets/Application.ets b/arkoala-arkts/arkui/src/ets/Application.ets index 0c2576c5d..de916e705 100644 --- a/arkoala-arkts/arkui/src/ets/Application.ets +++ b/arkoala-arkts/arkui/src/ets/Application.ets @@ -414,7 +414,7 @@ export class Application implements UserApplicationControl { for (const detachedRoot of detachedRoots.values()) { detachedRoot.value } - } catch (error: Error) { + } catch (error) { console.log(`has error in partialUpdates: ${error.message} ${error.stack}`) } // Notify subscriber. diff --git a/ets-tests/ets/pages/provide/ProvideConsumeNoOverride.ets b/ets-tests/ets/pages/provide/ProvideConsumeNoOverride.ets index d5a4aca46..a6138ebb2 100644 --- a/ets-tests/ets/pages/provide/ProvideConsumeNoOverride.ets +++ b/ets-tests/ets/pages/provide/ProvideConsumeNoOverride.ets @@ -44,7 +44,7 @@ struct ProvideConsumeNoOverride { ProvideConsumeNoOverrideChild() TestComponent({}) { uiLog(`after child build`) } } - catch (e: Error) { + catch (e) { } } } -- Gitee