You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc-tests harness: pass --app-bundle-id (and other widget-cross-compile flags) so home-screen widget targets become exercisable #194
Surfaced during the v0.5.299 docs audit. The 8 home-screen-widget docs pages (docs/src/widgets/{overview,creating-widgets,components,configuration,data-fetching,platforms,watchos,wearos}.md) document a Widget({...}) API that is wired in HIR/codegen (crates/perry-hir/src/lower.rs::try_lower_widget_decl, plus perry-codegen-glance, perry-codegen-wear-tiles, perry-codegen-swiftui for the per-platform output).
The CLI accepts:
--target ios-widget
--target ios-widget-simulator
--target android-widget
--target watchos-widget
--target watchos-widget-simulator
--target wearos-tile
But the doc-tests harness can't drive these targets because:
Each requires --app-bundle-id and the harness's cross_compile_one (crates/perry-doc-tests/src/main.rs:621) doesn't surface that flag.
The host-LLVM target lowers Widget({...}) to a no-op at execution time, so a host run wouldn't certify any widget output even if the harness ran it.
Because of this, all 46 ,no-test fences across the 8 widget pages are kept un-verified — even though the codegen path is real and works when invoked manually with the right CLI flags.
What to do
Two pieces:
1. Banner-driven bundle-id config. Extend the per-example banner format (currently // platforms:, // targets:, // run: false) with a new directive:
When the harness sees --target ios-widget (etc.) in the example's targets: list AND has a widget-bundle-id, invoke perry compile with --app-bundle-id filled in.
2. Cross-compile artifact check. Widget-target outputs are bundles or asset directories (.app / .apk / Tile.swift). Extend cross_compile_one's artifact-existence check to handle those layouts.
Acceptance criteria
An example with // targets: ios-widget, android-widget, wearos-tile + a widget-bundle-id banner cross-compiles cleanly under the doc-tests harness on a host with the right SDKs (Xcode for iOS/watchOS, Android NDK for android-widget/wearos-tile).
All 46 ,no-test fences across the 8 widget pages convert to verified {{#include}} extracts.
The widget pages drop their "Status: API wired but harness can't drive it" callouts.
CI matrix (.github/workflows/test.yml) gains a widget-targets job that runs the harness with the new flag plumbing on a macOS runner with Xcode installed.
Activity
feat(doc-tests): surface --app-bundle-id for widget-target examples (P…