peachsim 0.1.1716 → 0.1.1728
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -3
- package/cli/app-bundle-resources.ts +2 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/app-splash.ts +4 -4
- package/cli/app-stubs.ts +17 -0
- package/cli/command-registry.ts +1 -0
- package/cli/commands/control.ts +82 -822
- package/cli/commands/daemon.ts +8 -0
- package/cli/commands/detox.ts +3 -0
- package/cli/commands/doctor.ts +19 -2
- package/cli/commands/inspect/actions.ts +74 -14
- package/cli/commands/inspect/core.ts +5 -1
- package/cli/commands/inspect/settling.ts +5 -2
- package/cli/commands/inspect/wait-ready.ts +6 -0
- package/cli/commands/inspect.ts +48 -45
- package/cli/commands/kotlin.ts +12 -2
- package/cli/commands/package.ts +750 -0
- package/cli/commands/serve.ts +6 -0
- package/cli/commands/shell-url.ts +834 -0
- package/cli/commands/swift.ts +42 -102
- package/cli/commands/test.ts +20 -0
- package/cli/commands/upload.ts +1 -1
- package/cli/device-option.ts +1 -1
- package/cli/main.ts +13 -1
- package/cli/native-input.ts +199 -0
- package/cli/outbound-endpoints.ts +26 -1
- package/cli/packaged-app-launcher.ts +95 -0
- package/cli/scene-video.ts +13 -6
- package/detox/index.ts +187 -23
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +38000 -31658
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +184 -60
- package/dist-lib/dev-bundle-resolution.cjs +14 -13
- package/dist-lib/expo-swift-bundle.cjs +18199 -11834
- package/dist-lib/expo-swift-metadata.cjs +4 -1
- package/dist-lib/expo-swift-metadata.mjs +3 -1
- package/dist-lib/home-paths.cjs +21 -2
- package/dist-lib/host/bridge-host.cjs +26509 -23850
- package/dist-lib/host/fetch-proxy-handler.cjs +221 -222
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +876 -389
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +127 -16
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +883 -404
- package/dist-lib/native-app-identity-project.cjs +694 -280
- package/dist-lib/native-app-identity-project.mjs +490 -83
- package/dist-lib/native-app-identity.cjs +13 -2
- package/dist-lib/native-app-identity.mjs +13 -2
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +28 -23
- package/dist-lib/public-origins-lib.json +392 -224
- package/dist-lib/react-native-host-modules.cjs +32 -2
- package/dist-lib/react-native-host-modules.mjs +32 -2
- package/dist-lib/reap-browser.cjs +12 -4
- package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
- package/dist-lib/sdk.cjs +17 -7
- package/dist-lib/sdk.mjs +16 -7
- package/dist-lib/skills.cjs +61838 -47851
- package/dist-lib/swift-compile.cjs +583 -360
- package/dist-lib/swift-compile.mjs +496 -275
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +105 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +4453 -2231
- package/dist-lib/vite.cjs +230 -228
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +7 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -11
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +23 -1
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +12 -25
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +75 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
- package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/ioccom.h +99 -0
- package/sdk/ios/usr/include/sys/syslog.h +236 -0
- package/sdk/ios/usr/include/syslog.h +24 -0
- package/sdk/ios/wasm/include/fcntl.h +4 -2
- package/sdk/ios/wasm/include/stdio.h +24 -0
- package/sdk/ios/wasm/include/stdlib.h +32 -7
- package/sdk/ios/wasm/include/sys/file.h +7 -0
- package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
- package/sdk/ios/wasm/include/sys/syscall.h +9 -0
- package/sdk/ios/wasm/include/sys/time.h +10 -0
- package/sdk/ios/wasm/include/unistd.h +12 -3
- package/sdk/native-hashes.json +1 -0
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-test/SKILL.md +7 -3
- package/src/admitted-mac-build.ts +3 -0
- package/src/android-app-identity.ts +18 -0
- package/src/android-root-module.ts +9 -9
- package/src/appPackageContract.ts +81 -0
- package/src/bridge-contract.ts +50 -0
- package/src/bundle-channel.mjs +21 -4
- package/src/dev-bundle-resolution.ts +7 -27
- package/src/dom-source-reference.ts +15 -0
- package/src/expo-discovery-cache.ts +127 -23
- package/src/expo-manifest-body.ts +33 -0
- package/src/expo-native-workspace.ts +38 -13
- package/src/expo-swift-host.ts +264 -62
- package/src/expoSwiftContract.ts +3 -0
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +35 -1
- package/src/host/app-package-handler.ts +47 -0
- package/src/host/bridge-host.ts +3 -0
- package/src/host/staged-host-files.ts +18 -0
- package/src/index.ts +3 -0
- package/src/kotlin-host.ts +21 -18
- package/src/kotlin-instance-source.ts +126 -0
- package/src/menu.ts +7 -0
- package/src/native-app-identity-project.ts +7 -2
- package/src/native-app-identity.ts +11 -0
- package/src/native-firebase-config.ts +24 -1
- package/src/nitro-adapter.lock.json +268 -268
- package/src/nitro-bundle.ts +8 -0
- package/src/nitro-compile.ts +35 -9
- package/src/nitro-dependencies.ts +21 -19
- package/src/nitro-source.ts +4 -0
- package/src/nitroContract.ts +7 -0
- package/src/react-native-bridge-modules.ts +68 -42
- package/src/react-native-host-modules.ts +31 -1
- package/src/reactNativeConfigurationContract.ts +14 -0
- package/src/reap-browser.ts +15 -3
- package/src/sdk.ts +5 -0
- package/src/settingsContract.ts +27 -1
- package/src/sim-client.ts +4 -1
- package/src/storageSnapshotContract.ts +3 -0
- package/src/swift-compile.ts +221 -41
- package/src/swift-coverage/provenance.ts +1 -0
- package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
- package/src/swift-coverage/xcode-assets.ts +89 -131
- package/src/swift-coverage/xcode.ts +1 -1
- package/src/swift-cxx-reachable.ts +2 -1
- package/src/swift-distribution.lock.json +14 -13
- package/src/swift-host.ts +95 -22
- package/src/swift-icu.ts +1 -1
- package/src/swift-link-roots.ts +118 -0
- package/src/swift-objc-compile.ts +144 -22
- package/src/swift-objc-import.ts +6 -0
- package/src/swift-objc-standin.ts +2 -14
- package/src/swift-package-manifest.ts +14 -6
- package/src/swift-packages.ts +75 -11
- package/src/swift-pdf-raster.ts +1 -0
- package/src/swift-root-lock.ts +17 -1
- package/src/swift-source-pods.ts +2 -10
- package/src/swift-standin-emit.ts +592 -57
- package/src/swift-standins.ts +430 -49
- package/src/swift-submit.ts +3 -1
- package/src/swift-toolchain.ts +140 -17
- package/src/turbo-codegen-intake.ts +91 -0
- package/src/vite-plugin-one.ts +13 -9
- package/src/vite-plugin.ts +28 -15
- package/src/xcode-project.ts +223 -22
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import { execFileSync } from 'node:child_process'
|
|
2
1
|
import { createHash } from 'node:crypto'
|
|
3
|
-
import {
|
|
4
|
-
mkdirSync,
|
|
5
|
-
mkdtempSync,
|
|
6
|
-
readFileSync,
|
|
7
|
-
readdirSync,
|
|
8
|
-
rmSync,
|
|
9
|
-
statSync,
|
|
10
|
-
} from 'node:fs'
|
|
11
|
-
import { tmpdir } from 'node:os'
|
|
2
|
+
import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs'
|
|
12
3
|
import { join, relative, sep } from 'node:path'
|
|
4
|
+
import { swiftCoverageProvenance } from './provenance'
|
|
5
|
+
import {
|
|
6
|
+
type AssetDevice,
|
|
7
|
+
type AssetSymbolSettings,
|
|
8
|
+
assetSymbolSource,
|
|
9
|
+
assetSymbolsReproduce,
|
|
10
|
+
} from './xcode-asset-symbols'
|
|
13
11
|
|
|
14
12
|
const sha256 = (bytes: string | Buffer) =>
|
|
15
13
|
createHash('sha256').update(bytes).digest('hex')
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
// itself. unproven values stay unknown; proven ASSETCATALOG_OTHER_FLAGS
|
|
19
|
-
// words ride the invocation.
|
|
20
|
-
export const assetSymbolSettingKeys = [
|
|
21
|
-
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS',
|
|
22
|
-
'ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS',
|
|
23
|
-
'PRODUCT_BUNDLE_IDENTIFIER',
|
|
24
|
-
'TARGETED_DEVICE_FAMILY',
|
|
15
|
+
const unprovenAssetSettings = [
|
|
25
16
|
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS',
|
|
26
17
|
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS',
|
|
27
18
|
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS',
|
|
@@ -31,12 +22,18 @@ export const assetSymbolSettingKeys = [
|
|
|
31
22
|
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH',
|
|
32
23
|
'ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER',
|
|
33
24
|
'ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE',
|
|
34
|
-
'ASSETCATALOG_OTHER_FLAGS',
|
|
35
25
|
]
|
|
36
26
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
// settings that change the symbol file xcode generates. unproven values stay
|
|
28
|
+
// unknown; proven ASSETCATALOG_OTHER_FLAGS words are accepted.
|
|
29
|
+
export const assetSymbolSettingKeys = [
|
|
30
|
+
'ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS',
|
|
31
|
+
'ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS',
|
|
32
|
+
'PRODUCT_BUNDLE_IDENTIFIER',
|
|
33
|
+
'TARGETED_DEVICE_FAMILY',
|
|
34
|
+
...unprovenAssetSettings,
|
|
35
|
+
'ASSETCATALOG_OTHER_FLAGS',
|
|
36
|
+
]
|
|
40
37
|
|
|
41
38
|
// words in ASSETCATALOG_OTHER_FLAGS whose effect on the generated swift is
|
|
42
39
|
// proven. xcode appends the setting's whitespace-separated words to the same
|
|
@@ -51,7 +48,7 @@ const provenOtherAssetFlags = new Set([
|
|
|
51
48
|
|
|
52
49
|
export type SwiftAssetPlan = {
|
|
53
50
|
catalogs: { path: string; sha256: string }[]
|
|
54
|
-
|
|
51
|
+
settings: AssetSymbolSettings
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
// the catalog directories that hold target resources, with a digest of every
|
|
@@ -73,8 +70,24 @@ export function catalogDigest(directory: string) {
|
|
|
73
70
|
return sha256(JSON.stringify(hashes))
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
const symbolTexts = new Map<string, string>()
|
|
74
|
+
|
|
75
|
+
// the symbol source for a plan, kept by catalog contents so a rebuild of an
|
|
76
|
+
// unchanged target does not generate it again.
|
|
77
|
+
function symbolSource(plan: SwiftAssetPlan, root: string) {
|
|
78
|
+
const key = JSON.stringify([root, plan])
|
|
79
|
+
const known = symbolTexts.get(key)
|
|
80
|
+
if (known !== undefined) return { status: 'source' as const, text: known }
|
|
81
|
+
const source = assetSymbolSource(
|
|
82
|
+
plan.catalogs.map(({ path }) => join(root, path)),
|
|
83
|
+
plan.settings,
|
|
84
|
+
)
|
|
85
|
+
if (source.status === 'source') symbolTexts.set(key, source.text)
|
|
86
|
+
return source
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// stock xcode generates the symbols with these settings; extensions are on
|
|
90
|
+
// only when the setting resolves to YES, the xcspec default being NO.
|
|
78
91
|
export function planAssetSymbols(
|
|
79
92
|
resources: string[],
|
|
80
93
|
root: string,
|
|
@@ -109,13 +122,14 @@ export function planAssetSymbols(
|
|
|
109
122
|
)
|
|
110
123
|
const set = unprovenAssetSettings.filter((key) => settings[key])
|
|
111
124
|
const other = (settings.ASSETCATALOG_OTHER_FLAGS ?? '').trim()
|
|
112
|
-
|
|
113
|
-
if (otherFlags.some((flag) => !provenOtherAssetFlags.has(flag)))
|
|
125
|
+
if (other && other.split(/\s+/).some((flag) => !provenOtherAssetFlags.has(flag)))
|
|
114
126
|
set.push('ASSETCATALOG_OTHER_FLAGS')
|
|
115
127
|
if (set.length)
|
|
116
128
|
return unknown(
|
|
117
129
|
`Generated asset symbols are unproven with these settings: ${set.join(', ')}`,
|
|
118
130
|
)
|
|
131
|
+
// actool writes no symbol file without a bundle identifier; its value never
|
|
132
|
+
// reaches the file
|
|
119
133
|
const bundle = settings.PRODUCT_BUNDLE_IDENTIFIER
|
|
120
134
|
const target = settings.IPHONEOS_DEPLOYMENT_TARGET
|
|
121
135
|
if (!bundle || !target || /\$\(|\s/.test(bundle + target))
|
|
@@ -123,134 +137,78 @@ export function planAssetSymbols(
|
|
|
123
137
|
'Generated asset symbols need a resolved PRODUCT_BUNDLE_IDENTIFIER and IPHONEOS_DEPLOYMENT_TARGET.',
|
|
124
138
|
)
|
|
125
139
|
const families = (settings.TARGETED_DEVICE_FAMILY ?? '').split(',').sort().join(',')
|
|
126
|
-
// families 6 and 7 change neither
|
|
127
|
-
const devices =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
// families 6 and 7 change neither the devices nor symbols for the iOS slice
|
|
141
|
+
const devices: AssetDevice[] | undefined = (
|
|
142
|
+
{
|
|
143
|
+
'1': ['iphone'],
|
|
144
|
+
'2': ['ipad'],
|
|
145
|
+
'1,2': ['iphone', 'ipad'],
|
|
146
|
+
'1,2,6': ['iphone', 'ipad'],
|
|
147
|
+
'1,2,7': ['iphone', 'ipad'],
|
|
148
|
+
} satisfies Record<string, AssetDevice[]>
|
|
149
|
+
)[families]
|
|
134
150
|
if (!devices)
|
|
135
151
|
return unknown(
|
|
136
152
|
`Generated asset symbols are proven only for TARGETED_DEVICE_FAMILY 1, 2, 1,2, 1,2,6 or 1,2,7; this target resolves to "${settings.TARGETED_DEVICE_FAMILY ?? ''}".`,
|
|
137
153
|
)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})),
|
|
145
|
-
arguments: [
|
|
146
|
-
'--output-format',
|
|
147
|
-
'human-readable-text',
|
|
148
|
-
'--platform',
|
|
149
|
-
'iphonesimulator',
|
|
150
|
-
'--minimum-deployment-target',
|
|
151
|
-
target,
|
|
152
|
-
...devices.flatMap((device) => ['--target-device', device]),
|
|
153
|
-
'--bundle-identifier',
|
|
154
|
-
bundle,
|
|
155
|
-
...(extensions === 'YES'
|
|
156
|
-
? []
|
|
157
|
-
: ['--generate-swift-asset-symbol-extensions', 'NO']),
|
|
158
|
-
// proven other flags ride the same invocation, as xcode appends them
|
|
159
|
-
...otherFlags,
|
|
160
|
-
],
|
|
161
|
-
} satisfies SwiftAssetPlan,
|
|
154
|
+
const plan: SwiftAssetPlan = {
|
|
155
|
+
catalogs: catalogs.map((path) => ({
|
|
156
|
+
path,
|
|
157
|
+
sha256: catalogDigest(join(root, path)),
|
|
158
|
+
})),
|
|
159
|
+
settings: { deployment: target, devices, extensions: extensions === 'YES' },
|
|
162
160
|
}
|
|
161
|
+
const source = symbolSource(plan, root)
|
|
162
|
+
if (source.status === 'unknown') return unknown(source.reason)
|
|
163
|
+
return { status: 'plan' as const, plan }
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
//
|
|
166
|
+
// write the symbol file xcode would generate and record what produced it.
|
|
166
167
|
export function generateAssetSymbols(plan: SwiftAssetPlan, root: string, work: string) {
|
|
167
|
-
const compile = join(work, 'compiled')
|
|
168
|
-
mkdirSync(compile, { recursive: true })
|
|
169
168
|
const swift = join(work, 'GeneratedAssetSymbols.swift')
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
...plan.catalogs.map(({ path }) => join(root, path)),
|
|
173
|
-
'--compile',
|
|
174
|
-
compile,
|
|
175
|
-
'--output-partial-info-plist',
|
|
176
|
-
join(work, 'partial-info.plist'),
|
|
177
|
-
...plan.arguments,
|
|
178
|
-
'--generate-swift-asset-symbols',
|
|
179
|
-
swift,
|
|
180
|
-
'--generate-objc-asset-symbols',
|
|
181
|
-
join(work, 'GeneratedAssetSymbols.h'),
|
|
182
|
-
'--generate-asset-symbol-index',
|
|
183
|
-
join(work, 'GeneratedAssetSymbols-Index.plist'),
|
|
184
|
-
]
|
|
185
|
-
const run = (extra: string[]) =>
|
|
186
|
-
// runner-toolchain-platform: darwin
|
|
187
|
-
execFileSync('xcrun', extra, {
|
|
188
|
-
encoding: 'utf8',
|
|
189
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
190
|
-
})
|
|
191
|
-
const version = run(['actool', '--version', '--output-format', 'xml1'])
|
|
192
|
-
run(args)
|
|
193
|
-
const content = readFileSync(swift)
|
|
169
|
+
const text = assetSymbolText(plan, root)
|
|
170
|
+
writeFileSync(swift, text)
|
|
194
171
|
return {
|
|
195
172
|
path: swift,
|
|
196
173
|
producer: {
|
|
197
|
-
tool: '
|
|
198
|
-
|
|
199
|
-
|
|
174
|
+
tool: 'peach asset symbols',
|
|
175
|
+
reproduces: assetSymbolsReproduce,
|
|
176
|
+
source: swiftCoverageProvenance['swift-coverage/xcode-asset-symbols.ts'] ?? null,
|
|
177
|
+
settings: plan.settings,
|
|
200
178
|
catalogs: plan.catalogs,
|
|
201
|
-
sha256: sha256(
|
|
179
|
+
sha256: sha256(text),
|
|
202
180
|
},
|
|
203
181
|
}
|
|
204
182
|
}
|
|
205
183
|
|
|
206
|
-
const packageSymbols = new Map<string, string>()
|
|
207
|
-
|
|
208
184
|
// xcode compiles a package target's catalogs a second time with the package's
|
|
209
|
-
// declared iOS version and an extension-free symbol file
|
|
210
|
-
//
|
|
185
|
+
// declared iOS version and an extension-free symbol file. results are kept by
|
|
186
|
+
// catalog contents.
|
|
211
187
|
export function generatePackageAssetSymbols(
|
|
212
188
|
catalogs: string[],
|
|
213
189
|
packageDir: string,
|
|
214
190
|
iosDeployment: string,
|
|
215
|
-
bundle: string,
|
|
216
191
|
) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
'--target-device',
|
|
232
|
-
'ipad',
|
|
233
|
-
'--bundle-identifier',
|
|
234
|
-
bundle,
|
|
235
|
-
'--generate-swift-asset-symbol-extensions',
|
|
236
|
-
'NO',
|
|
237
|
-
],
|
|
238
|
-
}
|
|
239
|
-
return assetSymbolText(plan, packageDir)
|
|
192
|
+
return assetSymbolText(
|
|
193
|
+
{
|
|
194
|
+
catalogs: catalogs.map((catalog) => ({
|
|
195
|
+
path: relative(packageDir, catalog),
|
|
196
|
+
sha256: catalogDigest(catalog),
|
|
197
|
+
})),
|
|
198
|
+
settings: {
|
|
199
|
+
deployment: iosDeployment,
|
|
200
|
+
devices: ['iphone', 'ipad'],
|
|
201
|
+
extensions: false,
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
packageDir,
|
|
205
|
+
)
|
|
240
206
|
}
|
|
241
207
|
|
|
242
|
-
// the symbol source for a plan
|
|
243
|
-
//
|
|
208
|
+
// the symbol source for a plan; catalog content the generator was never shown
|
|
209
|
+
// to reproduce fails here with the asset and the reason.
|
|
244
210
|
export function assetSymbolText(plan: SwiftAssetPlan, root: string) {
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
const work = mkdtempSync(join(tmpdir(), 'peach-assets-'))
|
|
249
|
-
try {
|
|
250
|
-
const text = readFileSync(generateAssetSymbols(plan, root, work).path, 'utf8')
|
|
251
|
-
packageSymbols.set(key, text)
|
|
252
|
-
return text
|
|
253
|
-
} finally {
|
|
254
|
-
rmSync(work, { recursive: true, force: true })
|
|
255
|
-
}
|
|
211
|
+
const source = symbolSource(plan, root)
|
|
212
|
+
if (source.status === 'unknown') throw new Error(source.reason)
|
|
213
|
+
return source.text
|
|
256
214
|
}
|
|
@@ -561,7 +561,7 @@ export function swiftXcodeSourceInput(request: SwiftXcodeSourceInput) {
|
|
|
561
561
|
},
|
|
562
562
|
unknowns: [
|
|
563
563
|
'Membership and configuration come from the original Xcode target, using the existing arm64 iOS simulator reader. Schemes and other destinations are not evaluated.',
|
|
564
|
-
'Asset symbols are generated
|
|
564
|
+
'Asset symbols are generated by peach to match actool, and string catalog symbols with xcstringstool. Local package products compile as modules the app imports. Bridging headers pass the target header maps, search paths and preprocessor definitions to clang. Script and build rule outputs, per-file flags, source filters, native peers and dependency modules are rejected. SDK and dependency artifact identities and native proof remain unknown.',
|
|
565
565
|
],
|
|
566
566
|
}
|
|
567
567
|
} catch (error) {
|
|
@@ -112,7 +112,8 @@ export function xcodeCxxReachable(
|
|
|
112
112
|
})
|
|
113
113
|
const checkouts = remoteSwiftCheckouts(app.rootDir)
|
|
114
114
|
const search = binaries.map((binary) => {
|
|
115
|
-
if (binary.publicHeaders !== undefined
|
|
115
|
+
if (binary.publicHeaders !== undefined || binary.placeholder !== undefined)
|
|
116
|
+
return null
|
|
116
117
|
const headers = binaryHeaderSearchPaths(binary, checkouts).headers
|
|
117
118
|
if (headers.length !== 1) return null
|
|
118
119
|
const relative = relativeInside(checkouts, headers[0]!)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
3
|
-
"release": "swift-6.4.0-RELEASE-custom-
|
|
2
|
+
"id": "95a0e12e7c0af807",
|
|
3
|
+
"release": "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66",
|
|
4
4
|
"wasmSdkId": "swift-6.4.0-RELEASE_wasm-peach-cbf01f4b",
|
|
5
5
|
"wasmSdkUrl": "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-cbf01f4b.artifactbundle.tar.gz",
|
|
6
6
|
"wasmSdkChecksum": "2243db65b12743d577fecc6aa27761363ccef470202f1fef2582e58750c0da4f",
|
|
7
|
-
"source": "
|
|
7
|
+
"source": "56ee2df2c863050b8261f4f20f6a51c008682ce9",
|
|
8
8
|
"targets": [
|
|
9
9
|
"ImagePlayground",
|
|
10
10
|
"QuickLookThumbnailing",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"PeachFoundation",
|
|
45
45
|
"FoundationNetworking",
|
|
46
46
|
"DeveloperToolsSupport",
|
|
47
|
+
"CoreImageEnums",
|
|
47
48
|
"SwiftUI",
|
|
48
49
|
"DarwinRecords",
|
|
49
50
|
"Darwin",
|
|
@@ -175,11 +176,12 @@
|
|
|
175
176
|
],
|
|
176
177
|
"systemEnvironment": {
|
|
177
178
|
"scenePhase": ["string:active", "string:inactive", "string:background"],
|
|
178
|
-
"colorScheme": ["string:light", "string:dark"],
|
|
179
|
-
"semanticColors": ["object"],
|
|
180
179
|
"deviceModel": ["string"],
|
|
181
180
|
"systemName": ["string"],
|
|
182
181
|
"systemVersion": ["string"],
|
|
182
|
+
"colorScheme": ["string:light", "string:dark"],
|
|
183
|
+
"semanticColors": ["object"],
|
|
184
|
+
"imageAssets": ["object"],
|
|
183
185
|
"locale": ["string"],
|
|
184
186
|
"dynamicTypeSize": [
|
|
185
187
|
"string:xSmall",
|
|
@@ -195,23 +197,22 @@
|
|
|
195
197
|
"string:accessibility4",
|
|
196
198
|
"string:accessibility5"
|
|
197
199
|
],
|
|
198
|
-
"accessibilityReduceMotion": ["bool"],
|
|
199
200
|
"horizontalSizeClass": ["string:compact", "string:regular"],
|
|
200
201
|
"verticalSizeClass": ["string:compact", "string:regular"],
|
|
201
|
-
"
|
|
202
|
+
"accessibilityReduceMotion": ["bool"]
|
|
202
203
|
},
|
|
203
204
|
"hosts": {
|
|
204
205
|
"darwin-arm64": {
|
|
205
|
-
"sha256": "
|
|
206
|
-
"size":
|
|
206
|
+
"sha256": "2ab6cf8ee1a10b76ef46c90c8ee384f44594aa5be63ac267f55ab6cd30722595",
|
|
207
|
+
"size": 88639020
|
|
207
208
|
},
|
|
208
209
|
"linux-x64": {
|
|
209
|
-
"sha256": "
|
|
210
|
-
"size":
|
|
210
|
+
"sha256": "e159994e38c6043515c97d818c63f1e1b0170fb73b2cb721a6913b21691b1ec7",
|
|
211
|
+
"size": 91386228
|
|
211
212
|
},
|
|
212
213
|
"linux-arm64": {
|
|
213
|
-
"sha256": "
|
|
214
|
-
"size":
|
|
214
|
+
"sha256": "80ef20a79414516631bc1394c1fcd045d0381a3c8be8b65967d6a089ad768d23",
|
|
215
|
+
"size": 90878300
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
}
|