Repository navigation
Conversation
The ohos module of fluwx_no_pay was a symlink to ../_shared/ohos, whose HAR package/module name is "fluwx". The Flutter-OHOS toolchain generates plugin imports from the Dart package name (import ... from 'fluwx_no_pay'), so ohpm fails with '00604006 Inconsistent Dep Names' when building apps that depend on the published fluwx_no_pay package. Replace the symlink with a real copy of the shared ohos module and rename the HAR package/module name to "fluwx_no_pay". Closes OpenFlutter#778
Author
|
撤回:改动方式(符号链接替换为实体副本)导致 diff 文件数过多,不适合作为修复形式。问题根因与最小改动已在 #778 中说明,供维护者参考。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题 / Problem
packages/fluwx_no_pay/ohos是指向../_shared/ohos的符号链接,共享模块的 HAR 包名与模块名均为fluwx。Flutter-OHOS 工具链按 Dart 包名 生成插件导入(import FluwxPlugin from 'fluwx_no_pay'),并在entry/oh-package.json5中生成同名本地依赖;ohpm 校验时发现实际 HAR 名为fluwx,直接报00604006 Inconsistent Dep Names,HAP 构建失败。The
ohosmodule offluwx_no_payis a symlink to../_shared/ohos, whose HAR package/module name isfluwx. The Flutter-OHOS toolchain generates plugin imports from the Dart package name, so ohpm rejects the build: the local dependencyfluwx_no_paydoes not match the actual HAR namefluwx(error 00604006, see #778).fluwx包不受影响:其 Dart 包名正好也是fluwx。目前fluwx_no_pay的使用方只能维护本地重命名补丁。改动 / Change
packages/fluwx_no_pay/ohos的符号链接替换为_shared/ohos的实体副本(发布到 pub.dev 时符号链接本来就会被物化为实体目录,此处与发布产物结构一致)。oh-package.json5的name与src/main/module.json5的module.name,fluwx→fluwx_no_pay。_shared/ohos的完整diff -r确认:除上述两行外无任何差异。验证 / Verification
flutter build hap --debug通过,HAP 正常产出。fluwx_no_pay的 ohos 代码不再随_shared自动同步,后续 ohos 侧改动需同步两处;考虑到符号链接在发布时被物化、且当前方案对 fluwx_no_pay 直接不可用,这是最小修复。Closes #778