Repository navigation
Scope Android SwiftUI compatibility imports to Skip consumers - #784
Draft
piercifani wants to merge 1 commit into
Draft
piercifani wants to merge 1 commit into
piercifani wants to merge 1 commit into
Conversation
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.
Incremental Android builds can fail with
missing required module 'CJNI'when unrelated dependencies such as swift-clocks discover Skip's already-builtSwiftUIcompatibility module throughcanImport(SwiftUI). This makes a clean build pass while a subsequent compilation activates Apple-only extensions.Generated native package manifests now apply the
SwiftUI→SkipCompatibilitySwiftUImodule alias to dependencies on theSkipFuseUIproduct. SwiftPM forwards the alias to consumers, preserving their imports and qualified references while keeping the compatibility module out of unrelated targets'canImport(SwiftUI)checks. Existing aliases, dependency conditions, local target references, and Apple-platform manifests are preserved.Generated Android builds use a
swiftui-importsscratch subdirectory so upgrading cannot discover unaliased modules left by earlier builds. The compiler regression runs in the existing Android CI matrix after SDK installation.Fixes skiptools/skip-fuse-ui#171.
Validation:
SKIP_TEST_ANDROID_SWIFTUI_IMPORTS=1 swift test --filter 'AndroidSwiftUIImportTests|PackageRootTests' --jobs 4: 11 tests passed.--build-system native.git diff --checkpassed.