Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.44k stars 1.91k forks source link

The MMKV for HarmonyOS NEXT version lacks the interface for parsing the float type. #1280

Closed xiaoxizi2303 closed 4 months ago

xiaoxizi2303 commented 6 months ago

The version of MMKV

v1.3.5

What's the issue?

The MMKV for HarmonyOS NEXT version lacks the interface for parsing the float type.

lingol commented 6 months ago

Sure. But the number type in JavaScript is double underneath. Is there real need to handle float from double?

xiaoxizi2303 commented 6 months ago

I need to parse the mmkv storage file generated in the Android project on the Harmony project. This file stores data of the float type. Therefore, an interface of the float type is required to parse the data of the float type.

lingol commented 6 months ago

Noted.

xiaoxizi2303 commented 6 months ago

Thank you. When can this interface be provided? Because the customer encounters the problem that the float type cannot be parsed when using the mmkv library.

lingol commented 6 months ago

Yes.

xiaoxizi2303 commented 6 months ago

Hello, when can the modification of this problem be released to the ohpm central warehouse of Harmony?

lingol commented 6 months ago

Hello, when can the modification of this problem be released to the ohpm central warehouse of Harmony?

If you are in a hurry, we can publish an alpha version of 1.3.6-alpha.

xiaoxizi2303 commented 6 months ago

Yes, we really need this version now, thank you very much

lingol commented 6 months ago

v1.3.6-alpha is live on OHPM.

xiaoxizi2303 commented 6 months ago

Okay, thank you very much.

HandwerSTD commented 6 months ago

After upgrading to 1.3.6-alpha I found some warnings occurred when compiling. However mmkv still works fine so this might not be a bug, but it's still a bit annoying.

> hvigor WARN: ArkTS:WARN File: D:/DevEcoProjects/SomeProject/oh_modules/.ohpm/@tencent+mmkv@1.3.6-alpha/oh_modules/@tencent/mmkv/src/main/ets/utils/MMKV.ets:119:13
 Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)

WARN: ArkTS:WARN File: D:/DevEcoProjects/SomeProject/oh_modules/.ohpm/@tencent+mmkv@1.3.6-alpha/oh_modules/@tencent/mmkv/src/main/ets/utils/MMKV.ets:139:13
 Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)

WARN: ArkTS:WARN File: D:/DevEcoProjects/SomeProject/oh_modules/.ohpm/@tencent+mmkv@1.3.6-alpha/oh_modules/@tencent/mmkv/src/main/ets/utils/MMKV.ets:735:13
 Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)

WARN: ArkTS:WARN File: D:/DevEcoProjects/SomeProject/oh_modules/.ohpm/@tencent+mmkv@1.3.6-alpha/oh_modules/@tencent/mmkv/src/main/ets/utils/MMKV.ets:752:13
 Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)

WARN: ArkTS:WARN: For details about ArkTS syntax errors, see FAQs
WARN: ArkTS:WARN File: D:/DevEcoProjects/SomeProject/oh_modules/.ohpm/@tencent+mmkv@1.3.6-alpha/oh_modules/@tencent/mmkv/src/main/ets/utils/MMKV.ets:21:20
 Currently module for 'libmmkv.so' is not verified. If you're importing napi, its verification will be enabled in later SDK version. Please make sure the corresponding .d.ts file is provided and the napis are correctly declared.
lingol commented 6 months ago

Noted.

xiaoxizi2303 commented 6 months ago

This problem is not found in the Harmony project of the new version.

lingol commented 6 months ago

All except this one are fixed. I can't find any document about this warning.

Currently module for 'libmmkv.so' is not verified. If you're importing napi, its verification will be enabled in later SDK version. Please make sure the corresponding .d.ts file is provided and the napis are correctly declared.

xiaoxizi2303 commented 6 months ago

Other alarms are generated because the Harmony SDK updates the rules for verifying variable types.

lingol commented 6 months ago

The warning is fixed in v1.3.6-beta on OHPM.

xiaoxizi2303 commented 6 months ago

Okay, thanks.

lingol commented 4 months ago

It's fixed in v1.3.6.