feat: add snapshot build script for HarmonyOS Flutter SDK - #17
Open
YoloMao wants to merge 1 commit into
Open
Conversation
The OpenHarmony Flutter SDK rebuilds the Dart VM with its own patches, so snapshots built against upstream Dart fail to load (wrong full snapshot version). flutter_snapshot_dump_ohos.sh builds JIT + AOT frontend server snapshots with the ohos SDK's own dart binary, on top of dart_flutter.patch plus the OpenHarmony engine dart patch, aligning the pkg/vm ffi abi list (ohosX64) with the engine platform dill. Verified with flutter 3.22.1-ohos-1.0.4 (Dart 3.4.0): injection call sites present in app.dill and autotrack events reported on device. Released as tag 3.22.1-ohos. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
概述
为 HarmonyOS 特制版 Flutter SDK(openharmony-sig/flutter_flutter)提供无埋点 AOP snapshot 的构建能力。特制版的 Dart VM 由 引擎 dart 补丁 重新构建,上游构建的 snapshot 加载时报
Wrong full snapshot version,故需专用构建流程与专用 tag。变更内容
flutter_snapshot_dump_ohos.sh:可复用的 ohos snapshot 构建脚本,用于制作 3.xx.x-ohos 版本,流程为:dart_flutter.patch(AOP 转换器)attachment/repos/dart.<dart_version>.patch(ohos 支持)pkg/vm的 FFI ABI 列表(gitee 补丁缺少ohosX64,与引擎 platform dill 不一致会报Type IntPtr has no mapping for ABI,脚本自动补齐)frontend_server_aot.dart.snapshot,必须替换)与新版本制作流程验证
dump_kernel确认 app.dill 中 29 处钩子调用点(GestureRecognizer/PageRoute/SchedulerBinding 等)3.22.1-ohos(release/3.22.1-ohos分支,含 darwin_arm64 AOT + JIT 产物)🤖 Generated with Claude Code