Replace Skip with AndroidSwiftUI#22
Merged
Merged
Conversation
Merged
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.
Replaces Skip with AndroidSwiftUI. Apple platforms now
use the system SwiftUI directly with no framework in between; Android uses AndroidSwiftUI, selected
per-file with
#if canImport(SwiftUI).Depends on PureSwift/AndroidSwiftUI#4, which adds the SwiftUI surface this app needs
(
NavigationStack,TabView,.sheet,.refreshable, lazy stacks, Observation support).What changed
skip,skip-model,skip-fuseandskip-fuse-uiare gone, replaced by asingle
AndroidSwiftUIdependency linked only.when(platforms: [.android]). Theskipstonebuild plugin, all three
Skip/skip.ymlfiles andSkip.envare removed.@Observable/import Observation; theSkipModeland
SkipFuseimports were purely additive and are dropped.SkipFuse'sLoggeris replaced by a smallAppLoggershim —os.Loggeron Appleplatforms, printing elsewhere.
/* SKIP @bridge */annotations are removed.Darwin/Sources/Main.swiftwasalready a real
@mainSwiftUIApp, so nothing was needed to replace the bridge on Apple.ComposeView/HeartComposer(Compose interop behind#if SKIP) andthe unused
WelcomeView/"Powered by Skip" template scaffolding, none of which can compile withoutthe transpiler. The first tab was labelled "Welcome" with a heart icon while showing the device
list; it is now "Devices".
Removing Skip also fixed the dependency graph
The package resolves from a clean checkout with no mirrors and no
SWIFTPM_ENABLE_MACROS=0, andthe dependency count drops from ~30 to 20. Every blocker documented in
Documentation/DependencyState.mdentered through the Skip fork stack:
swift-android-nativeidentity came fromskip-android-bridgepointing at a forkwhile
PureSwift/Androidpointed at upstream — with the bridge gone there is only one claimant;swift-java→ swift-syntax 603 vs Bluetooth macros conflict came in the same way;skip-fuse-uino longer constrainsskip-ui.That document is now largely historical. PureSwift/Android#43 and PureSwift/AndroidBluetooth#4 are
still needed —
AndroidBluetoothrequestsAndroidManifestfrom the wrong package.Unrelated fix included: plugin deadline
The GATT test suite was failing intermittently. I first blamed machine load; that was wrong — it
failed on an idle machine too. Running each plugin serially showed zero failures, which located
the real cause: the suite loads all 13 bundled plugins per test, each holding a warm interpreter on
its own thread, and running its tests concurrently multiplies that into dozens of contending
interpreters that blow the 50 ms per-call deadline. A healthy plugin was being quarantined for being
slow under contention — which could equally happen on a busy phone during a dense scan.
Two changes: the stress suite is
.serialized, and the default per-call deadline is raised from50 ms to 250 ms. That is still a decisive runaway guard given a real parse takes tens of
microseconds, and warmup is separately bounded at 5 s.
Verification
Android is not verified end to end. Before it can be, this needs PureSwift/AndroidSwiftUI#4
merged, the two PureSwift dependency PRs merged, and the Kotlin JNI peers under
Sources/BluetoothExplorer/Skip/(ScanCallback.kt,BluetoothGattCallback.kt) rehomed into theAndroid app project — they are
AndroidBluetoothpeers, unrelated to Skip, and only lived therebecause skipstone collected them. None of the new AndroidSwiftUI code has run on a device;
Documentation/AndroidSwiftUIMigration.mdlists its known gaps (no@Bindable, TabView resetsunselected tabs'
@State, sheet is a full-screen overlay,.refreshableis inert).