Summary
Companion to #395 (which fixed perry_ui_*). The same root cause leaks two more symbol families into the harmonyos libentry.so:
perry_system_* — 22 symbols (e.g. perry_system_is_dark_mode, perry_system_get_device_model, perry_system_audio_*, perry_system_keychain_*, perry_system_notification_*, perry_get_device_idiom)
perry_updater_* — 14 symbols
These are defined ONLY in the per-platform UI crates (perry-ui-macos / perry-ui-android / perry-ui-ios / perry-ui-gtk4 / perry-ui-windows), not in perry-runtime or perry-stdlib. On harmonyos there's no perry-ui-harmonyos crate, and unlike perry/ui's App({body: ...}) literal, perry/system + perry/updater calls don't go through the perry-codegen-arkts harvest pass — the LLVM codegen always emits the extern declarations.
So the moment a harmonyos app calls isDarkMode() / getDeviceModel() / keychainSave() / any other perry/system or perry/updater API (from anywhere — top-level, event handler, library code), the OHOS dynamic loader will reject the bundle with Error relocating ... perry_system_X: symbol not found or perry_updater_X: symbol not found.
This will surface immediately on Mango once #395 unblocks embedNSView, because Mango uses perry/system darkmode + locale APIs.
Suggested fix
Extend the perry-runtime/build.rs from #395 to also scan PERRY_SYSTEM_TABLE + PERRY_UPDATER_TABLE from perry-dispatch. Mechanical ~10 LOC change — replace the tables slice with all four tables and adjust the symbol-prefix filter. Each stub is auto-generated as a no-op via the existing ReturnKind → default-value mapping. Same cfg(feature = "ohos-napi") gating; same drift-proof source-of-truth approach.
Optionally, gate per-symbol so calls that DO have a real harmonyos impl (e.g. perry_system_is_dark_mode could route to @ohos.application.Configuration.colorMode via NAPI) get a real implementation instead of the no-op default — but that's per-symbol work and the immediate priority is just getting the link to resolve.
Affected versions
Latent on every Perry version that supports --target harmonyos (#399 onward, v0.5.418+). Masked because #395's perry_ui_embed_nsview fired first; will be the next undefined symbol once #395 lands.
Blocking
Likely the next undefined-symbol blocker after #395 lands. Should be fixed as a same-PR follow-up or immediately after.
Summary
Companion to #395 (which fixed
perry_ui_*). The same root cause leaks two more symbol families into the harmonyoslibentry.so:perry_system_*— 22 symbols (e.g.perry_system_is_dark_mode,perry_system_get_device_model,perry_system_audio_*,perry_system_keychain_*,perry_system_notification_*,perry_get_device_idiom)perry_updater_*— 14 symbolsThese are defined ONLY in the per-platform UI crates (
perry-ui-macos/perry-ui-android/perry-ui-ios/perry-ui-gtk4/perry-ui-windows), not inperry-runtimeorperry-stdlib. On harmonyos there's noperry-ui-harmonyoscrate, and unlikeperry/ui'sApp({body: ...})literal,perry/system+perry/updatercalls don't go through theperry-codegen-arktsharvest pass — the LLVM codegen always emits the extern declarations.So the moment a harmonyos app calls
isDarkMode()/getDeviceModel()/keychainSave()/ any otherperry/systemorperry/updaterAPI (from anywhere — top-level, event handler, library code), the OHOS dynamic loader will reject the bundle withError relocating ... perry_system_X: symbol not foundorperry_updater_X: symbol not found.This will surface immediately on Mango once #395 unblocks
embedNSView, because Mango usesperry/systemdarkmode + locale APIs.Suggested fix
Extend the
perry-runtime/build.rsfrom #395 to also scanPERRY_SYSTEM_TABLE+PERRY_UPDATER_TABLEfromperry-dispatch. Mechanical ~10 LOC change — replace thetablesslice with all four tables and adjust the symbol-prefix filter. Each stub is auto-generated as a no-op via the existingReturnKind→ default-value mapping. Samecfg(feature = "ohos-napi")gating; same drift-proof source-of-truth approach.Optionally, gate per-symbol so calls that DO have a real harmonyos impl (e.g.
perry_system_is_dark_modecould route to@ohos.application.Configuration.colorModevia NAPI) get a real implementation instead of the no-op default — but that's per-symbol work and the immediate priority is just getting the link to resolve.Affected versions
Latent on every Perry version that supports
--target harmonyos(#399 onward, v0.5.418+). Masked because #395'sperry_ui_embed_nsviewfired first; will be the next undefined symbol once #395 lands.Blocking
Likely the next undefined-symbol blocker after #395 lands. Should be fixed as a same-PR follow-up or immediately after.