Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xiaoxizi2303 opened this issue Apr 25, 2024 · 17 comments

Comments

@xiaoxizi2303
Copy link

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
Copy link
Collaborator

lingol commented Apr 25, 2024

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

@xiaoxizi2303
Copy link
Author

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
Copy link
Collaborator

lingol commented Apr 25, 2024

Noted.

@xiaoxizi2303
Copy link
Author

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
Copy link
Collaborator

lingol commented Apr 25, 2024

Yes.

@xiaoxizi2303
Copy link
Author

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

@lingol
Copy link
Collaborator

lingol commented Apr 29, 2024

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
Copy link
Author

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

@lingol
Copy link
Collaborator

lingol commented Apr 29, 2024

v1.3.6-alpha is live on OHPM.

@xiaoxizi2303
Copy link
Author

Okay, thank you very much.

@HandwerSTD
Copy link

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/@[email protected]/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/@[email protected]/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/@[email protected]/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/@[email protected]/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/@[email protected]/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
Copy link
Collaborator

lingol commented May 5, 2024

Noted.

@xiaoxizi2303
Copy link
Author

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

lingol added a commit that referenced this issue May 6, 2024
@lingol
Copy link
Collaborator

lingol commented May 6, 2024

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
Copy link
Author

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

@lingol
Copy link
Collaborator

lingol commented May 9, 2024

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

@xiaoxizi2303
Copy link
Author

Okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants