Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

Copy swiftbuild .bundle resource folders to the device for skip android test - #277

Merged
marcprux merged 1 commit into
skiptools:mainfrom
piercifani:android-test-copy-swiftbuild-bundles
Sep 19, 2026
Merged

marcprux merged 1 commit into
skiptools:mainfrom
piercifani:android-test-copy-swiftbuild-bundles

Conversation

@piercifani

Copy link
Copy Markdown
Contributor

Problem

With Swift 6.4, swift build defaults to the swiftbuild engine. skip android test already handles its executable layout (*-test-runner + companion .so), but resource folders still follow the native engine's naming: only <package>_<target>.resources directories are pushed to the device. swiftbuild emits <package>_<target>.bundle directories instead, and the Bundle.module accessor it generates resolves Bundle.main.bundleURL/<name>.bundle. Any test that touches Bundle.module (fixtures, String(localized:)) therefore traps on the device:

AppData/resource_bundle_accessor.swift:44: Fatal error: unable to find bundle named polymarket-shared_AppData

Observed with skip 1.9.10, Swift 6.4.0 Android SDK, skip android test --package-path <bridged multi-module package> on a macOS host without --build-system native.

Change

Include .bundle directories in the resource folders transferred to the staging directory, alongside .resources. One filter change in AndroidCommand.swift; the push logic is unchanged.

Verified

Build products under .build/out/Products/Debug-android-aarch64/ contain the expected polymarket-shared_AppData.bundle (with Localizable.xcstrings) etc.; pushing them next to the runner is exactly what the generated accessor expects. Until this lands we pass them via --copy from a wrapper script, which works.

…id test

The native SwiftPM engine emits resource folders as <package>_<target>.resources
and skip android test pushes those to the device. The swiftbuild engine (the
Swift 6.4 default) emits <package>_<target>.bundle instead, and its generated
Bundle.module accessor looks for that name next to the executable, so a test
that touches Bundle.module trapped on the device:

  resource_bundle_accessor.swift:44: Fatal error: unable to find bundle named polymarket-shared_AppData

Push .bundle folders alongside .resources so both layouts run.
@cla-bot cla-bot Bot added the cla-signed label Sep 18, 2026
@marcprux
marcprux merged commit 12c4051 into skiptools:main Sep 19, 2026
14 of 17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants