peachsim 0.1.1963 → 0.1.1965
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/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 +194 -49
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +192 -48
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +193 -49
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +3 -3
- 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 +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -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 +3 -3
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -3
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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 +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +194 -49
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +6 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +191 -47
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/swift-objc-standin.ts +3 -4
- package/src/swift-packages.ts +13 -1
- package/src/swift-standin-emit.ts +16 -3
- package/src/swift-standins.ts +188 -33
- package/src/swift-toolchain.ts +6 -0
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1965 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "05c0959ec7458f26e96bb0a18e01dd196e19e087c1c71e031ce0707d2494287d", "home-paths.ts": "af600a7f017474946ede726320a133d830e77e4e287b043d4fea026a945ce748", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "c126efdce870c1953833ec9c32d66b15bbe422ab2a31b7531be3e278edbc9737", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -4775,6 +4775,9 @@ var linuxHostSdkRoot;
|
|
|
4775
4775
|
function setSwiftLinuxLibraryPath(libraryPath) {
|
|
4776
4776
|
linuxLibraryPath = libraryPath;
|
|
4777
4777
|
}
|
|
4778
|
+
function withoutCoreDump(file, args) {
|
|
4779
|
+
return ["/bin/sh", ["-c", 'ulimit -c 0; exec "$@"', "sh", file, ...args]];
|
|
4780
|
+
}
|
|
4778
4781
|
function swiftEnvironment(base = process.env) {
|
|
4779
4782
|
return {
|
|
4780
4783
|
...base,
|
|
@@ -6218,7 +6221,12 @@ function splitTopLevel(text5, separator) {
|
|
|
6218
6221
|
function emitSwiftStandin(sourceGraphs, options) {
|
|
6219
6222
|
const imported = new Set(options.imports);
|
|
6220
6223
|
const importedTypeModules = options.importedTypeModules ?? /* @__PURE__ */ new Map();
|
|
6221
|
-
const
|
|
6224
|
+
const ownIds = new Set(
|
|
6225
|
+
sourceGraphs.flatMap(
|
|
6226
|
+
(graph) => graph.symbols.map((symbol2) => symbol2.identifier.precise)
|
|
6227
|
+
)
|
|
6228
|
+
);
|
|
6229
|
+
const graphs = [...sourceGraphs, ...options.dependencyGraphs ?? []].map(
|
|
6222
6230
|
(graph) => qualifyImportedTypes(graph, imported, importedTypeModules)
|
|
6223
6231
|
);
|
|
6224
6232
|
const nativeObjcProtocols = objcProtocolsInSwiftSignatures(graphs);
|
|
@@ -6802,7 +6810,8 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
6802
6810
|
)
|
|
6803
6811
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
6804
6812
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
6805
|
-
if (!parentSymbol
|
|
6813
|
+
if (!parentSymbol || !ownIds.has(parentSymbol.identifier.precise))
|
|
6814
|
+
list2.push(standinMarker);
|
|
6806
6815
|
const open = symbol2.accessLevel === "open" && (!parentSymbol || parentSymbol.accessLevel === "open");
|
|
6807
6816
|
const objcName = /^c:objc\(cs\)(\w+)$/.exec(id)?.[1];
|
|
6808
6817
|
emit(
|
|
@@ -7152,7 +7161,9 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
7152
7161
|
return match ? [`${match[1]}|${LEADING_ATTRS.exec(text(symbol2))[2]}`] : [];
|
|
7153
7162
|
})
|
|
7154
7163
|
);
|
|
7155
|
-
const roots = [...byId.values()].filter(
|
|
7164
|
+
const roots = [...byId.values()].filter(
|
|
7165
|
+
(symbol2) => ownIds.has(symbol2.identifier.precise) && !owner.has(symbol2.identifier.precise) && !unavailable(symbol2)
|
|
7166
|
+
).filter((symbol2) => {
|
|
7156
7167
|
const name3 = /^c:@M@[^@]+@F@([^@]+)$/.exec(symbol2.identifier.precise)?.[1];
|
|
7157
7168
|
return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
|
|
7158
7169
|
}).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
|
|
@@ -7164,6 +7175,7 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
7164
7175
|
for (const [name3, members2] of [...external].sort(([a], [b]) => a.localeCompare(b))) {
|
|
7165
7176
|
const seen = /* @__PURE__ */ new Set();
|
|
7166
7177
|
const kept = members2.filter((member) => {
|
|
7178
|
+
if (!ownIds.has(member.identifier.precise)) return false;
|
|
7167
7179
|
const key2 = `${member.kind.identifier}|${text(member)}`;
|
|
7168
7180
|
if (unavailable(member) || seen.has(key2)) return false;
|
|
7169
7181
|
seen.add(key2);
|
|
@@ -7768,8 +7780,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
7768
7780
|
import_node_fs7.default.rmSync(out, { recursive: true, force: true });
|
|
7769
7781
|
import_node_fs7.default.mkdirSync(out, { recursive: true });
|
|
7770
7782
|
const run5 = (0, import_node_child_process6.spawnSync)(
|
|
7771
|
-
import_node_path7.default.join(toolchainBin, "swift-symbolgraph-extract"),
|
|
7772
|
-
[
|
|
7783
|
+
...withoutCoreDump(import_node_path7.default.join(toolchainBin, "swift-symbolgraph-extract"), [
|
|
7773
7784
|
"-module-name",
|
|
7774
7785
|
surface.module,
|
|
7775
7786
|
"-target",
|
|
@@ -7789,7 +7800,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
7789
7800
|
"-omit-extension-block-symbols",
|
|
7790
7801
|
"-output-dir",
|
|
7791
7802
|
out
|
|
7792
|
-
],
|
|
7803
|
+
]),
|
|
7793
7804
|
{ encoding: "utf8", env: swiftEnvironment(), maxBuffer: 256 * 1024 * 1024 }
|
|
7794
7805
|
);
|
|
7795
7806
|
if (run5.error) throw run5.error;
|
|
@@ -16699,7 +16710,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
16699
16710
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
16700
16711
|
var MULTI_MANIFEST_VERSION = 66;
|
|
16701
16712
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
16702
|
-
var compilerSourceDigest = true ? "
|
|
16713
|
+
var compilerSourceDigest = true ? "777d4db5d7a8d74f3fc33c50d60c04b62ad2fdce4bce2e2eec8c4e358d61ce92" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
16703
16714
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
16704
16715
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
16705
16716
|
hash.update(`swift-compile
|
|
@@ -29309,6 +29320,11 @@ function resolveSwiftPackages(options) {
|
|
|
29309
29320
|
if (claimed.has(key2)) return true;
|
|
29310
29321
|
const target = pkg.manifest.targets.get(name3);
|
|
29311
29322
|
if (!target || target.type !== "regular" || placeholderPackage(pkg)) return false;
|
|
29323
|
+
const files2 = swiftTargetFiles(pkg.manifest, target);
|
|
29324
|
+
if (files2.every(
|
|
29325
|
+
(file) => file.endsWith(".swift") && import_node_fs38.default.readFileSync(file, "utf8").trim() === ""
|
|
29326
|
+
))
|
|
29327
|
+
return false;
|
|
29312
29328
|
claimed.add(key2);
|
|
29313
29329
|
provided.delete(name3);
|
|
29314
29330
|
for (const dependency of target.dependencies) {
|
|
@@ -29416,7 +29432,7 @@ function resolveSwiftPackages(options) {
|
|
|
29416
29432
|
if (provided.has(name3) && placeholderPackage(pkg)) return;
|
|
29417
29433
|
for (const dependency of pkg.manifest.targets.get(name3)?.dependencies ?? []) {
|
|
29418
29434
|
if (dependency.kind === "target") visit(pkg, dependency.name);
|
|
29419
|
-
else {
|
|
29435
|
+
else if (!provided.has(dependency.name)) {
|
|
29420
29436
|
const nested = dependencyPackage(pkg, dependency);
|
|
29421
29437
|
if (nested && typeof nested !== "string")
|
|
29422
29438
|
for (const root of nested.manifest.products.get(dependency.name)?.targets ?? [])
|
|
@@ -29425,6 +29441,7 @@ function resolveSwiftPackages(options) {
|
|
|
29425
29441
|
}
|
|
29426
29442
|
};
|
|
29427
29443
|
for (const { product, source } of listed) {
|
|
29444
|
+
if (provided.has(product)) continue;
|
|
29428
29445
|
const pkg = source.kind === "unnamed" ? unnamed(source, product) : packages.get(sourceKey(source));
|
|
29429
29446
|
if (!pkg || typeof pkg === "string") continue;
|
|
29430
29447
|
for (const root of pkg.manifest.products.get(product)?.targets ?? [])
|
|
@@ -29647,7 +29664,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
29647
29664
|
return hash.digest("hex");
|
|
29648
29665
|
}
|
|
29649
29666
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
29650
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
29667
|
+
var STANDIN_SOURCE_DIGEST = true ? "a7e1ecaaff6c8861c337b5c6049d14450807f5be059d246ba06f5abd6384bfe7" : standinSourceDigest();
|
|
29651
29668
|
|
|
29652
29669
|
// src/swift-standins.ts
|
|
29653
29670
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -30531,11 +30548,11 @@ ${uikit}${body}`
|
|
|
30531
30548
|
function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
|
|
30532
30549
|
const artifact = xcframework(binary);
|
|
30533
30550
|
const slice = simulatorSlice(artifact.dir);
|
|
30534
|
-
const found = surfaces(artifact.dir, slice);
|
|
30551
|
+
const found = surfaces(artifact.dir, binary.target, slice);
|
|
30535
30552
|
const frameworks = [
|
|
30536
30553
|
...new Set(
|
|
30537
30554
|
found.flatMap(
|
|
30538
|
-
(surface) => "modulemap" in surface && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path47.default.dirname(
|
|
30555
|
+
(surface) => "modulemap" in surface && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path47.default.dirname(surface.headers)] : []
|
|
30539
30556
|
)
|
|
30540
30557
|
)
|
|
30541
30558
|
];
|
|
@@ -30600,8 +30617,21 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
|
|
|
30600
30617
|
import_node_path47.default.join(pending, "frameworks", import_node_path47.default.basename(framework), part),
|
|
30601
30618
|
{ recursive: true, dereference: true }
|
|
30602
30619
|
);
|
|
30620
|
+
const surface = found.find(
|
|
30621
|
+
(item) => "headers" in item && import_node_path47.default.dirname(item.headers) === framework
|
|
30622
|
+
);
|
|
30623
|
+
if (surface && "modulemap" in surface) {
|
|
30624
|
+
const modules = import_node_path47.default.join(
|
|
30625
|
+
pending,
|
|
30626
|
+
"frameworks",
|
|
30627
|
+
import_node_path47.default.basename(framework),
|
|
30628
|
+
"Modules"
|
|
30629
|
+
);
|
|
30630
|
+
import_node_fs45.default.mkdirSync(modules, { recursive: true });
|
|
30631
|
+
import_node_fs45.default.copyFileSync(surface.modulemap, import_node_path47.default.join(modules, "module.modulemap"));
|
|
30632
|
+
}
|
|
30603
30633
|
}
|
|
30604
|
-
for (const [index, directory] of headers.entries())
|
|
30634
|
+
for (const [index, directory] of headers.entries()) {
|
|
30605
30635
|
import_node_fs45.default.cpSync(directory, import_node_path47.default.join(pending, "headers", String(index)), {
|
|
30606
30636
|
recursive: true,
|
|
30607
30637
|
dereference: true,
|
|
@@ -30609,6 +30639,15 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
|
|
|
30609
30639
|
filter: (source) => import_node_fs45.default.statSync(source).isDirectory() ? import_node_path47.default.dirname(source) !== directory || !import_node_path47.default.basename(source).startsWith("ios-") : !isBinaryLibraryFile(source)
|
|
30610
30640
|
} : {}
|
|
30611
30641
|
});
|
|
30642
|
+
const surface = found.find(
|
|
30643
|
+
(item) => "headers" in item && item.headers === directory
|
|
30644
|
+
);
|
|
30645
|
+
if (surface && "modulemap" in surface)
|
|
30646
|
+
import_node_fs45.default.copyFileSync(
|
|
30647
|
+
surface.modulemap,
|
|
30648
|
+
import_node_path47.default.join(pending, "headers", String(index), "module.modulemap")
|
|
30649
|
+
);
|
|
30650
|
+
}
|
|
30612
30651
|
const contents = (0, import_node_crypto24.createHash)("sha256");
|
|
30613
30652
|
for (const relative2 of import_node_fs45.default.readdirSync(pending, { recursive: true, encoding: "utf8" }).sort()) {
|
|
30614
30653
|
const file = import_node_path47.default.join(pending, relative2);
|
|
@@ -30664,7 +30703,7 @@ function simulatorSlice(xcframeworkDir) {
|
|
|
30664
30703
|
const slice = import_node_fs45.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
30665
30704
|
return slice ? import_node_path47.default.join(xcframeworkDir, slice) : null;
|
|
30666
30705
|
}
|
|
30667
|
-
function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
30706
|
+
function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)) {
|
|
30668
30707
|
const standaloneMap = import_node_path47.default.join(xcframeworkDir, "module.modulemap");
|
|
30669
30708
|
if (import_node_fs45.default.existsSync(standaloneMap)) {
|
|
30670
30709
|
const module2 = moduleMapName(import_node_fs45.default.readFileSync(standaloneMap, "utf8"));
|
|
@@ -30685,7 +30724,16 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
|
30685
30724
|
(name3) => name3.endsWith(".swiftinterface") && !name3.endsWith(".private.swiftinterface") && !name3.endsWith(".package.swiftinterface")
|
|
30686
30725
|
);
|
|
30687
30726
|
const chosen = interfaces.find((name3) => name3.startsWith("arm64-")) ?? interfaces[0] ?? null;
|
|
30688
|
-
|
|
30727
|
+
let modulemap = import_node_path47.default.join(framework, "Modules", "module.modulemap");
|
|
30728
|
+
const headers2 = import_node_path47.default.join(framework, "Headers");
|
|
30729
|
+
if (!import_node_fs45.default.existsSync(modulemap) && files(headers2, (name3) => name3.endsWith(".h")).length) {
|
|
30730
|
+
const umbrella = import_node_fs45.default.existsSync(import_node_path47.default.join(headers2, `${module2}.h`)) ? `umbrella header "${module2}.h"` : 'umbrella "Headers"';
|
|
30731
|
+
modulemap = generatedModuleMap(
|
|
30732
|
+
`framework module ${module2} { ${umbrella} export * module * { export * } }
|
|
30733
|
+
`,
|
|
30734
|
+
true
|
|
30735
|
+
);
|
|
30736
|
+
}
|
|
30689
30737
|
if (chosen) {
|
|
30690
30738
|
const privateInterface = import_node_path47.default.join(
|
|
30691
30739
|
swiftmodule,
|
|
@@ -30717,8 +30765,33 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
|
|
|
30717
30765
|
const module2 = moduleMapName(import_node_fs45.default.readFileSync(modulemap, "utf8"));
|
|
30718
30766
|
if (module2) found.push(headerSurface(module2, modulemap, import_node_path47.default.dirname(modulemap)));
|
|
30719
30767
|
}
|
|
30768
|
+
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
30769
|
+
const module2 = swiftTargetModuleName(target);
|
|
30770
|
+
const modulemap = generatedModuleMap(
|
|
30771
|
+
`module ${module2} { umbrella "." export * }
|
|
30772
|
+
`,
|
|
30773
|
+
false
|
|
30774
|
+
);
|
|
30775
|
+
found.push(headerSurface(module2, modulemap, headers));
|
|
30776
|
+
}
|
|
30720
30777
|
return found;
|
|
30721
30778
|
}
|
|
30779
|
+
function generatedModuleMap(text5, framework) {
|
|
30780
|
+
const dir = import_node_path47.default.join(
|
|
30781
|
+
cacheDir4,
|
|
30782
|
+
"modulemaps",
|
|
30783
|
+
key(text5),
|
|
30784
|
+
framework ? "Modules" : "Headers"
|
|
30785
|
+
);
|
|
30786
|
+
import_node_fs45.default.mkdirSync(dir, { recursive: true });
|
|
30787
|
+
const file = import_node_path47.default.join(dir, "module.modulemap");
|
|
30788
|
+
if (!import_node_fs45.default.existsSync(file)) {
|
|
30789
|
+
const pending = `${file}.${process.pid}.tmp`;
|
|
30790
|
+
import_node_fs45.default.writeFileSync(pending, text5);
|
|
30791
|
+
import_node_fs45.default.renameSync(pending, file);
|
|
30792
|
+
}
|
|
30793
|
+
return file;
|
|
30794
|
+
}
|
|
30722
30795
|
function peachModuleDirs(toolchain, imports2, sdkIncludes) {
|
|
30723
30796
|
const { moduleRoot, toolchainBin } = toolchain;
|
|
30724
30797
|
if (swiftDistributionAt(moduleRoot)) return [import_node_path47.default.join(moduleRoot, "modules")];
|
|
@@ -30861,22 +30934,24 @@ function swiftStandin(surface, binary, toolchain, work, behavior, siblings) {
|
|
|
30861
30934
|
symbolgraphWasm.push(wasm[index]);
|
|
30862
30935
|
}
|
|
30863
30936
|
symbolgraphWasm.push("-Xcc", "-Xclang", "-Xcc", "-fmodule-format=raw");
|
|
30864
|
-
exec(
|
|
30865
|
-
"-
|
|
30866
|
-
|
|
30867
|
-
|
|
30868
|
-
|
|
30869
|
-
|
|
30870
|
-
|
|
30871
|
-
|
|
30872
|
-
|
|
30873
|
-
|
|
30874
|
-
|
|
30875
|
-
|
|
30876
|
-
|
|
30877
|
-
|
|
30878
|
-
|
|
30879
|
-
|
|
30937
|
+
exec(
|
|
30938
|
+
...withoutCoreDump(import_node_path47.default.join(toolchain.toolchainBin, "swift-symbolgraph-extract"), [
|
|
30939
|
+
"-module-name",
|
|
30940
|
+
surface.module,
|
|
30941
|
+
...symbolgraphWasm,
|
|
30942
|
+
"-I",
|
|
30943
|
+
search,
|
|
30944
|
+
// at public the graph drops underscored public declarations, which other
|
|
30945
|
+
// public ones name; the emitter keeps only public and open symbols
|
|
30946
|
+
"-minimum-access-level",
|
|
30947
|
+
"internal",
|
|
30948
|
+
"-include-spi-symbols",
|
|
30949
|
+
"-skip-synthesized-members",
|
|
30950
|
+
"-omit-extension-block-symbols",
|
|
30951
|
+
"-output-dir",
|
|
30952
|
+
out
|
|
30953
|
+
])
|
|
30954
|
+
);
|
|
30880
30955
|
const graphs = import_node_fs45.default.readdirSync(out).filter((name3) => name3.endsWith(".symbols.json")).sort().map((name3) => JSON.parse(import_node_fs45.default.readFileSync(import_node_path47.default.join(out, name3), "utf8")));
|
|
30881
30956
|
const supplemented = synthesizedInterfaceEnums(text5, surface.module, graphs);
|
|
30882
30957
|
restoreSwiftInterfaceSPI(text5, surface.module, graphs);
|
|
@@ -31140,18 +31215,39 @@ function wasmFlags(toolchain, imports2) {
|
|
|
31140
31215
|
...toolchain.standinModules ? ["-I", toolchain.standinModules] : []
|
|
31141
31216
|
];
|
|
31142
31217
|
}
|
|
31143
|
-
function objcStandin(surface, binary, toolchain, work, behavior) {
|
|
31218
|
+
function objcStandin(surface, binary, toolchain, work, behavior, frameworks, siblings) {
|
|
31144
31219
|
const view = objcView(
|
|
31145
31220
|
surface,
|
|
31146
31221
|
toolchain.toolchainBin,
|
|
31147
31222
|
import_node_path47.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
|
|
31148
31223
|
cacheDir4,
|
|
31149
|
-
import_node_path47.default.join(work, "objc")
|
|
31224
|
+
import_node_path47.default.join(work, "objc"),
|
|
31225
|
+
void 0,
|
|
31226
|
+
frameworks.dirs
|
|
31150
31227
|
);
|
|
31151
31228
|
const provided = new Set(swiftPeachModules(toolchain.moduleRoot));
|
|
31152
31229
|
const headerModules = view.imports.filter(
|
|
31153
|
-
(name3) => !STANDIN_IMPORTS.includes(name3) && provided.has(name3)
|
|
31230
|
+
(name3) => !STANDIN_IMPORTS.includes(name3) && (provided.has(name3) || siblings.has(name3))
|
|
31154
31231
|
);
|
|
31232
|
+
const dependencyGraphs = headerModules.flatMap((module2) => {
|
|
31233
|
+
const dependency = frameworks.surfaces.get(module2);
|
|
31234
|
+
if (!dependency || module2 === surface.module) return [];
|
|
31235
|
+
return objcView(
|
|
31236
|
+
{
|
|
31237
|
+
module: dependency.module,
|
|
31238
|
+
modulemap: dependency.modulemap,
|
|
31239
|
+
headers: dependency.headers
|
|
31240
|
+
},
|
|
31241
|
+
toolchain.toolchainBin,
|
|
31242
|
+
import_node_path47.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
|
|
31243
|
+
cacheDir4,
|
|
31244
|
+
import_node_path47.default.join(work, "dependencies", module2),
|
|
31245
|
+
void 0,
|
|
31246
|
+
frameworks.dirs.filter(
|
|
31247
|
+
(dir) => !import_node_fs45.default.existsSync(import_node_path47.default.join(dir, `${module2}.framework`))
|
|
31248
|
+
)
|
|
31249
|
+
).graphs;
|
|
31250
|
+
});
|
|
31155
31251
|
return graphStandin(
|
|
31156
31252
|
surface.module,
|
|
31157
31253
|
view.graphs,
|
|
@@ -31168,12 +31264,18 @@ function objcStandin(surface, binary, toolchain, work, behavior) {
|
|
|
31168
31264
|
(dependency) => swiftTargetModuleName(dependency.module)
|
|
31169
31265
|
) ?? []
|
|
31170
31266
|
])
|
|
31171
|
-
]
|
|
31267
|
+
],
|
|
31268
|
+
false,
|
|
31269
|
+
/* @__PURE__ */ new Map(),
|
|
31270
|
+
null,
|
|
31271
|
+
/* @__PURE__ */ new Map(),
|
|
31272
|
+
/* @__PURE__ */ new Map(),
|
|
31273
|
+
dependencyGraphs
|
|
31172
31274
|
);
|
|
31173
31275
|
}
|
|
31174
31276
|
var OBJC_UNREPRESENTABLE = "cannot be marked '@objc' because its type cannot be represented in Objective-C";
|
|
31175
31277
|
var INERT_VALUE = /missing argument|cannot be constructed|has no member 'init'|no exact matches in call to initializer|cannot convert return expression|does not conform to '|extra argument|takes no arguments|could not be inferred|cannot infer/;
|
|
31176
|
-
function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map()) {
|
|
31278
|
+
function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = []) {
|
|
31177
31279
|
const paths = new Set(
|
|
31178
31280
|
graphs.flatMap(
|
|
31179
31281
|
(graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
|
|
@@ -31229,6 +31331,7 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, be
|
|
|
31229
31331
|
objcProperties,
|
|
31230
31332
|
inheritedConformances,
|
|
31231
31333
|
projections,
|
|
31334
|
+
dependencyGraphs,
|
|
31232
31335
|
...placeholder ? { exported: placeholder.exported, placeholder: binary.placeholder.gap } : {}
|
|
31233
31336
|
});
|
|
31234
31337
|
for (const entry of skipped) {
|
|
@@ -31905,6 +32008,11 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
|
|
|
31905
32008
|
}))
|
|
31906
32009
|
});
|
|
31907
32010
|
} else {
|
|
32011
|
+
const absent = missingArtifactGap(binary);
|
|
32012
|
+
if (absent !== null) {
|
|
32013
|
+
gaps.set(binary.target, absent);
|
|
32014
|
+
continue;
|
|
32015
|
+
}
|
|
31908
32016
|
const resolved = xcframework(binary);
|
|
31909
32017
|
const dir = import_node_path47.default.join(artifact, String(index), import_node_path47.default.basename(resolved.dir));
|
|
31910
32018
|
import_node_fs45.default.cpSync(resolved.dir, dir, { recursive: true, dereference: true });
|
|
@@ -32041,7 +32149,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
32041
32149
|
const modules = new Set(
|
|
32042
32150
|
binaries.flatMap((binary) => {
|
|
32043
32151
|
try {
|
|
32044
|
-
return binary.publicHeaders !== void 0 || binary.placeholder !== void 0 ? [swiftTargetModuleName(binary.target)] : surfaces(xcframework(binary).dir).map(
|
|
32152
|
+
return binary.publicHeaders !== void 0 || binary.placeholder !== void 0 ? [swiftTargetModuleName(binary.target)] : surfaces(xcframework(binary).dir, binary.target).map(
|
|
32153
|
+
(surface) => surface.module
|
|
32154
|
+
);
|
|
32045
32155
|
} catch {
|
|
32046
32156
|
return [];
|
|
32047
32157
|
}
|
|
@@ -32074,7 +32184,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
32074
32184
|
if (binary.publicHeaders !== void 0 && swiftTargetModuleName(binary.target) !== binary.target)
|
|
32075
32185
|
parts.push(`module/${swiftTargetModuleName(binary.target)}`);
|
|
32076
32186
|
try {
|
|
32077
|
-
if (binary.publicHeaders === void 0 && surfaces(xcframework(binary).dir).some(
|
|
32187
|
+
if (binary.publicHeaders === void 0 && surfaces(xcframework(binary).dir, binary.target).some(
|
|
32188
|
+
(surface) => surface.kind === "swift"
|
|
32189
|
+
))
|
|
32078
32190
|
parts.push(`interface-emulation/${WASI_EMULATION.join(",")}`);
|
|
32079
32191
|
parts.push(
|
|
32080
32192
|
binary.target,
|
|
@@ -32102,10 +32214,14 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
|
|
|
32102
32214
|
}
|
|
32103
32215
|
return (0, import_node_crypto24.createHash)("sha256").update(parts.join("\0")).digest("hex");
|
|
32104
32216
|
}
|
|
32217
|
+
function missingArtifactGap(binary) {
|
|
32218
|
+
if (swiftBinaryOnDisk(binary)) return null;
|
|
32219
|
+
return `${import_node_path47.default.relative(process.cwd(), binary.dir) || binary.dir} is not on disk, and Xcode fails without it too; run the script that downloads or builds it, then run again`;
|
|
32220
|
+
}
|
|
32105
32221
|
async function binaryStandins(binary, toolchain, provided, behavior, frameworks, siblings) {
|
|
32106
32222
|
if (provided.has(binary.target)) return [];
|
|
32107
|
-
|
|
32108
|
-
|
|
32223
|
+
const absent = missingArtifactGap(binary);
|
|
32224
|
+
if (absent !== null) return absent;
|
|
32109
32225
|
import_node_fs45.default.mkdirSync(cacheDir4, { recursive: true });
|
|
32110
32226
|
const work = import_node_fs45.default.mkdtempSync(import_node_path47.default.join(cacheDir4, "work-"));
|
|
32111
32227
|
let all;
|
|
@@ -32157,7 +32273,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
32157
32273
|
].join("\0");
|
|
32158
32274
|
} else {
|
|
32159
32275
|
const artifact = xcframework(binary);
|
|
32160
|
-
all = surfaces(artifact.dir);
|
|
32276
|
+
all = surfaces(artifact.dir, binary.target);
|
|
32161
32277
|
digest = artifact.digest;
|
|
32162
32278
|
}
|
|
32163
32279
|
} catch (error) {
|
|
@@ -32176,7 +32292,8 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
32176
32292
|
);
|
|
32177
32293
|
hash.update(digest);
|
|
32178
32294
|
hash.update([...siblings].sort().join("\0"));
|
|
32179
|
-
if (found.some((surface) => surface.kind === "mixed"
|
|
32295
|
+
if (found.some((surface) => surface.kind === "mixed" || surface.kind === "objc"))
|
|
32296
|
+
hash.update(frameworks.digest);
|
|
32180
32297
|
for (const surface of found) {
|
|
32181
32298
|
hash.update(`${surface.kind}\0${surface.module}\0`);
|
|
32182
32299
|
for (const file of surface.kind === "swift" ? [surface.interface] : surface.kind === "source" ? surface.sources : [
|
|
@@ -32253,7 +32370,9 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
32253
32370
|
binary,
|
|
32254
32371
|
toolchain,
|
|
32255
32372
|
dir,
|
|
32256
|
-
new Map(Object.entries(configured.get(surface.module) ?? {}))
|
|
32373
|
+
new Map(Object.entries(configured.get(surface.module) ?? {})),
|
|
32374
|
+
frameworks,
|
|
32375
|
+
siblings
|
|
32257
32376
|
) : binary.cxxHeaders ? await cxxStandin(surface, binary, toolchain, dir) : cStandin(surface, binary, toolchain, dir)
|
|
32258
32377
|
);
|
|
32259
32378
|
} catch (error) {
|
|
@@ -32276,6 +32395,19 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
32276
32395
|
return settle(result);
|
|
32277
32396
|
}
|
|
32278
32397
|
async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new Set(), behavior = {}) {
|
|
32398
|
+
const built2 = await buildStandins(binaries, toolchain, provided, behavior);
|
|
32399
|
+
return {
|
|
32400
|
+
standins: built2.standins,
|
|
32401
|
+
gaps: new Map([...built2.gaps].map(([target, gap]) => [target, gapText(gap)]))
|
|
32402
|
+
};
|
|
32403
|
+
}
|
|
32404
|
+
function gapText(gap) {
|
|
32405
|
+
const lines = gap.split("\n").map((line) => line.trim()).filter((line) => line && !/^[{[\]}",]/.test(line) && !/"kind":/.test(line));
|
|
32406
|
+
const errors = lines.filter((line) => /\berror:/.test(line));
|
|
32407
|
+
const text5 = (errors.length > 0 ? errors : lines).slice(0, 4).join("; ");
|
|
32408
|
+
return text5.length > 600 ? `${text5.slice(0, 600)}\u2026` : text5;
|
|
32409
|
+
}
|
|
32410
|
+
async function buildStandins(binaries, toolchain, provided, behavior) {
|
|
32279
32411
|
const requested = binaries.filter((binary) => !provided.has(binary.target));
|
|
32280
32412
|
if (requested.length === 0) return { standins: [], gaps: /* @__PURE__ */ new Map() };
|
|
32281
32413
|
if (process.platform === "darwin" && process.env.TM_EXEC_BUILD_PLATFORM !== "mac" && process.env.TM_SESSION && process.env.CI !== "true" && toolchain.moduleRoot === sourceSwiftCheckout() && !swiftDistributionAt(toolchain.moduleRoot))
|
|
@@ -32285,6 +32417,7 @@ async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new
|
|
|
32285
32417
|
import_node_fs45.default.mkdirSync(cacheDir4, { recursive: true });
|
|
32286
32418
|
const modules = import_node_fs45.default.mkdtempSync(import_node_path47.default.join(cacheDir4, "modules-"));
|
|
32287
32419
|
const frameworkDirs = /* @__PURE__ */ new Set();
|
|
32420
|
+
const frameworkSurfaces = /* @__PURE__ */ new Map();
|
|
32288
32421
|
const frameworkInputs = [];
|
|
32289
32422
|
const byModule = new Map(
|
|
32290
32423
|
binaries.map((binary) => [swiftTargetModuleName(binary.target), binary])
|
|
@@ -32308,16 +32441,26 @@ async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new
|
|
|
32308
32441
|
frameworkInputs.push(`${binary.target}\0${artifact.digest}`);
|
|
32309
32442
|
const imports2 = /* @__PURE__ */ new Set();
|
|
32310
32443
|
interfaceImports.set(binary, imports2);
|
|
32311
|
-
for (const surface of surfaces(artifact.dir)) {
|
|
32444
|
+
for (const surface of surfaces(artifact.dir, binary.target)) {
|
|
32312
32445
|
byModule.set(surface.module, binary);
|
|
32313
32446
|
if (surface.kind === "swift" || surface.kind === "mixed")
|
|
32314
32447
|
for (const module2 of swiftImportNames(
|
|
32315
32448
|
import_node_fs45.default.readFileSync(surface.interface, "utf8")
|
|
32316
32449
|
))
|
|
32317
32450
|
imports2.add(module2);
|
|
32451
|
+
if (surface.kind === "objc" || surface.kind === "mixed")
|
|
32452
|
+
for (const file of files(surface.headers, (name3) => name3.endsWith(".h")))
|
|
32453
|
+
for (const module2 of clangImportNames(
|
|
32454
|
+
import_node_fs45.default.readFileSync(import_node_path47.default.join(surface.headers, file), "utf8")
|
|
32455
|
+
))
|
|
32456
|
+
imports2.add(module2);
|
|
32318
32457
|
if (surface.kind === "c") continue;
|
|
32458
|
+
if (surface.kind === "objc" || surface.kind === "mixed")
|
|
32459
|
+
frameworkSurfaces.set(surface.module, surface);
|
|
32460
|
+
if (surface.kind !== "swift" && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) !== "Modules")
|
|
32461
|
+
continue;
|
|
32319
32462
|
frameworkDirs.add(
|
|
32320
|
-
surface.kind === "swift" ? import_node_path47.default.resolve(surface.interface, "../../../..") : import_node_path47.default.resolve(surface.
|
|
32463
|
+
surface.kind === "swift" ? import_node_path47.default.resolve(surface.interface, "../../../..") : import_node_path47.default.resolve(surface.headers, "../..")
|
|
32321
32464
|
);
|
|
32322
32465
|
}
|
|
32323
32466
|
} catch {
|
|
@@ -32326,7 +32469,8 @@ async function swiftStandins(binaries, toolchain, provided = /* @__PURE__ */ new
|
|
|
32326
32469
|
const generatedToolchain = { ...toolchain, standinModules: modules };
|
|
32327
32470
|
const frameworks = {
|
|
32328
32471
|
dirs: [...frameworkDirs].sort(),
|
|
32329
|
-
digest: (0, import_node_crypto24.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex")
|
|
32472
|
+
digest: (0, import_node_crypto24.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
|
|
32473
|
+
surfaces: frameworkSurfaces
|
|
32330
32474
|
};
|
|
32331
32475
|
const siblings = new Map(
|
|
32332
32476
|
binaries.map((binary) => [
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1965 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1965 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ import { swiftObjCPlatformFlags } from './swift-objc-platform'
|
|
|
23
23
|
import { IOS_SDK_HEADERS, IOS_SDK_OVERLAYS, IOS_SDK_TARGET } from './swift-objc-sdk'
|
|
24
24
|
import { clangImportNames, moduleMapTokens } from './swift-package'
|
|
25
25
|
import { objcProtocolsInSwiftSignatures, type SymbolGraph } from './swift-standin-emit'
|
|
26
|
-
import { swiftEnvironment } from './swift-toolchain'
|
|
26
|
+
import { swiftEnvironment, withoutCoreDump } from './swift-toolchain'
|
|
27
27
|
|
|
28
28
|
/** a module map and the headers it reaches: a framework's, or a library
|
|
29
29
|
* slice's headers directory. */
|
|
@@ -688,8 +688,7 @@ export function objcView(
|
|
|
688
688
|
fs.rmSync(out, { recursive: true, force: true })
|
|
689
689
|
fs.mkdirSync(out, { recursive: true })
|
|
690
690
|
const run = spawnSync(
|
|
691
|
-
path.join(toolchainBin, 'swift-symbolgraph-extract'),
|
|
692
|
-
[
|
|
691
|
+
...withoutCoreDump(path.join(toolchainBin, 'swift-symbolgraph-extract'), [
|
|
693
692
|
'-module-name',
|
|
694
693
|
surface.module,
|
|
695
694
|
'-target',
|
|
@@ -709,7 +708,7 @@ export function objcView(
|
|
|
709
708
|
'-omit-extension-block-symbols',
|
|
710
709
|
'-output-dir',
|
|
711
710
|
out,
|
|
712
|
-
],
|
|
711
|
+
]),
|
|
713
712
|
{ encoding: 'utf8', env: swiftEnvironment(), maxBuffer: 256 * 1024 * 1024 },
|
|
714
713
|
)
|
|
715
714
|
if (run.error) throw run.error
|
package/src/swift-packages.ts
CHANGED
|
@@ -765,6 +765,15 @@ export function resolveSwiftPackages(options: {
|
|
|
765
765
|
if (claimed.has(key)) return true
|
|
766
766
|
const target = pkg.manifest.targets.get(name)
|
|
767
767
|
if (!target || target.type !== 'regular' || placeholderPackage(pkg)) return false
|
|
768
|
+
// a wrapper target with empty sources only groups binary dependencies,
|
|
769
|
+
// which the module peach ships already covers
|
|
770
|
+
const files = swiftTargetFiles(pkg.manifest, target)
|
|
771
|
+
if (
|
|
772
|
+
files.every(
|
|
773
|
+
(file) => file.endsWith('.swift') && fs.readFileSync(file, 'utf8').trim() === '',
|
|
774
|
+
)
|
|
775
|
+
)
|
|
776
|
+
return false
|
|
768
777
|
claimed.add(key)
|
|
769
778
|
provided.delete(name)
|
|
770
779
|
for (const dependency of target.dependencies) {
|
|
@@ -907,7 +916,7 @@ export function resolveSwiftPackages(options: {
|
|
|
907
916
|
if (provided.has(name) && placeholderPackage(pkg)) return
|
|
908
917
|
for (const dependency of pkg.manifest.targets.get(name)?.dependencies ?? []) {
|
|
909
918
|
if (dependency.kind === 'target') visit(pkg, dependency.name)
|
|
910
|
-
else {
|
|
919
|
+
else if (!provided.has(dependency.name)) {
|
|
911
920
|
const nested = dependencyPackage(pkg, dependency)
|
|
912
921
|
if (nested && typeof nested !== 'string')
|
|
913
922
|
for (const root of nested.manifest.products.get(dependency.name)?.targets ??
|
|
@@ -916,7 +925,10 @@ export function resolveSwiftPackages(options: {
|
|
|
916
925
|
}
|
|
917
926
|
}
|
|
918
927
|
}
|
|
928
|
+
// a product peach ships links as its module, so its wrapper targets and
|
|
929
|
+
// their binary dependencies are not part of what compiles
|
|
919
930
|
for (const { product, source } of listed) {
|
|
931
|
+
if (provided.has(product)) continue
|
|
920
932
|
const pkg =
|
|
921
933
|
source.kind === 'unnamed'
|
|
922
934
|
? unnamed(source, product)
|