feat(perry/system): getOSVersion() bug-report-flow utility#976
Merged
Conversation
Adds a tiny perry/system entry point that returns the OS version
string for the running platform — a frequent need for crash-report
flows / telemetry payloads that want to send (app version, OS
version, device model) tuples.
import { getOSVersion } from "perry/system";
const ver = getOSVersion(); // e.g. "Version 14.5 (Build 23F79)"
| Platform | Status |
|------------|-----------------------------------------------------------------|
| **macOS** | Real impl: [[NSProcessInfo processInfo] operatingSystemVersionString] |
| iOS | Stub + follow-up warning (UIDevice.systemVersion) |
| tvOS | Stub + follow-up (UIDevice.systemVersion is available) |
| watchOS | Stub + follow-up |
| visionOS | Stub + follow-up (UIKit UserDefaults path) |
| Android | Stub + follow-up (Build.VERSION.RELEASE via JNI) |
| Windows | Stub + follow-up (RtlGetVersion) |
| Linux/GTK4 | Stub + follow-up (/etc/os-release or uname -r) |
| WASM | Stub via dispatch table fallback |
| HarmonyOS | Stub auto-generated by perry-runtime/build.rs |
Pairs naturally with the existing getDeviceModel / getAppVersion /
getBundleId surfaces so bug-report flows can build a complete
diagnostic tuple in one place.
[[NSProcessInfo processInfo] operatingSystemVersionString] returns
the human-readable form like "Version 14.5 (Build 23F79)" — kept
as-is so triage can grep the build number too. NSString → UTF-8 bytes
via UTF8String + lengthOfBytesUsingEncoding:NSUTF8StringEncoding (= 4).
- perry-api-manifest/src/entries.rs — method row.
- perry-dispatch/src/lib.rs — MethodRow with no args, ReturnKind::F64
(matches getDeviceModel's string-as-i64 convention). WASM falls
through to ui_method_to_runtime() — symbol mapping for free.
- Per-platform exports across all UI crates (real on macOS, stub
elsewhere).
- perry-ui-test/src/lib.rs — Feature row.
- HarmonyOS auto-stubbed via perry-runtime/build.rs.
- docs/api/perry.d.ts + docs/src/api/reference.md regenerated via
./scripts/regen_api_docs.sh.
App({body: VStack([Text("os: " + getOSVersion())])}) + console.log
against release perry; symbol resolves end-to-end, link succeeds,
binary writes cleanly.
28ac5bb to
5419373
Compare
3 tasks
proggeramlug
added a commit
that referenced
this pull request
May 18, 2026
…Rs (#1019) #981 (PERRY_SANDBOX_BUILDRS), #988 (--emit-attest), and #969 (perry.permissions) each landed via admin-bypass with their SUMMARY.md entries intact but without the actual .md content files (or, for #969, without any docs entry at all). docs/src/cli/lockdown.md and docs/src/cli/emit-sandbox.md did make it into main and are fine; the others left dead links. Separately, #976 / #972 / #974 added perry/system runtime methods (getOSVersion, shareText, shareUrl, appGroupSet/Get/Delete) but never updated the hand-maintained types/perry/system/index.d.ts. TypeScript users importing those APIs from `perry/system` get a type error today. This PR: - Creates docs/src/cli/sandbox-buildrs.md (#505) - Creates docs/src/cli/emit-attest.md (#504) - Creates docs/src/cli/capabilities.md (#501) and adds the SUMMARY.md entry - Adds the six new perry/system signatures to types/perry/system/index.d.ts The auto-generated docs/api/perry.d.ts + docs/src/api/reference.md were regenerated during the original PRs and are already current. Pure docs-only diff. No code changes.
proggeramlug
added a commit
that referenced
this pull request
May 18, 2026
The FEATURES matrix in perry-ui-test marks share_text/share_url (#917), app_group_set/get/delete (#675), and get_os_version (#976) as Supported on Web, but the corresponding stubs were never added to web_runtime.js when those PRs landed. test_web now panics with 'Web is missing 6 expected symbol(s)' on every PR's cargo-test. Add no-op / localStorage-backed stubs: - share_text/share_url: empty (real Web Share API via navigator.share is a follow-up) - app_group_set/get/delete: localStorage with prefix - get_os_version: navigator.userAgent fallback Drive-by in this PR; same fix can be cherry-picked if the ads PR doesn't merge first.
proggeramlug
added a commit
that referenced
this pull request
May 18, 2026
The FEATURES matrix in perry-ui-test marks share_text/share_url (#917), app_group_set/get/delete (#675), and get_os_version (#976) as Supported on Web, but the corresponding stubs were never added to web_runtime.js when those PRs landed. test_web now panics with 'Web is missing 6 expected symbol(s)' on every PR's cargo-test. Add no-op / localStorage-backed stubs: - share_text/share_url: empty (real Web Share API via navigator.share is a follow-up) - app_group_set/get/delete: localStorage with prefix - get_os_version: navigator.userAgent fallback Drive-by in this PR; same fix can be cherry-picked if the ads PR doesn't merge first.
proggeramlug
added a commit
that referenced
this pull request
May 18, 2026
…re responses, no SDK linked) (#1040) * feat(perry-ext): #867 — perry/ads MVP (FFI scaffold, structured-failure responses) Cookie-cutter follow-on to #674's @perryts/google-auth: lands the six-function FFI surface for `perry/ads` (interstitial load/show, rewarded load/show, banner create/destroy) wired end-to-end through perry-api-manifest, codegen NATIVE_MODULE_TABLE + runtime_decls, well_known_bindings, and types/perry/ads/. Every entry point resolves a structured `{ error: "no-sdk-linked" }` JSON placeholder; no real ad SDK is linked. Real Google Mobile Ads integration (iOS SwiftPM + Android play-services-ads), the GDPR / ATT consent flow, the Info.plist + AndroidManifest auto- injection, and the `<AdBanner>` perry/ui widget glue are all explicit follow-ups under the same issue. * style: cargo fmt on ads MVP additions * chore: drop accidentally-committed .perry-cache audit blob * fix(test): make collect_archives test host-arch-agnostic (#498 followup) The collect_archives_picks_up_scoped_package test introduced by fails on Linux x86_64 CI (target_key derives from host arch even when platform is overridden). Loosened to prefix-check 'macos-' so it passes on both arm64 and x86_64 hosts. Drive-by inside this PR; same fix should be cherry-picked or re-landed independently if this PR doesn't merge. * chore: gitignore test-files/.perry-cache (smoke-test transient) * fix(web-runtime): add stubs for 6 perry_system_* symbols missing on Web The FEATURES matrix in perry-ui-test marks share_text/share_url (#917), app_group_set/get/delete (#675), and get_os_version (#976) as Supported on Web, but the corresponding stubs were never added to web_runtime.js when those PRs landed. test_web now panics with 'Web is missing 6 expected symbol(s)' on every PR's cargo-test. Add no-op / localStorage-backed stubs: - share_text/share_url: empty (real Web Share API via navigator.share is a follow-up) - app_group_set/get/delete: localStorage with prefix - get_os_version: navigator.userAgent fallback Drive-by in this PR; same fix can be cherry-picked if the ads PR doesn't merge first. * docs: regenerate API reference + .d.ts post-rebase
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.
Small perry/system entry point returning the OS version string for the running platform — a frequent need for crash-report flows / telemetry payloads that want to send
(app version, OS version, device model)tuples in one place.Cross-platform coverage
[[NSProcessInfo processInfo] operatingSystemVersionString]UIDevice.systemVersion)Build.VERSION.RELEASEvia JNI)RtlGetVersion)/etc/os-releaseoruname -r)perry-runtime/build.rsPairs naturally with the existing
getDeviceModel/getAppVersion/getBundleIdsurfaces so bug-report flows can build a complete diagnostic tuple in one place.macOS implementation detail
[[NSProcessInfo processInfo] operatingSystemVersionString]returns the human-readable form ("Version 14.5 (Build 23F79)") — kept as-is so triage can grep the build number too. NSString → UTF-8 bytes viaUTF8String+lengthOfBytesUsingEncoding:NSUTF8StringEncoding(= 4).Plumbing (mirrors #918 / #917 / #675)
ui_method_to_runtime(). Docs regenerated.Smoke test
App({body: VStack([Text("os: " + getOSVersion())])})against release perry: symbol resolves end-to-end, link succeeds, binary writes cleanly.Notes
No
Cargo.tomlversion bump, noCLAUDE.mdtouch, noCHANGELOG.mdentry — maintainer folds those in at merge time.