stim 1.20.2 → 1.21.0
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 +88 -8
- package/dist/acquire-artifact-CD4lbiWE.mjs +153 -0
- package/dist/act-DHAw2A2S.mjs +2667 -0
- package/dist/activity-BzVfHSrY.mjs +1376 -0
- package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -65
- package/dist/{android-HqP1_vB_.mjs → android-BEJ8Jpl7.mjs} +2 -2
- package/dist/{android-DCKZrNvV.mjs → android-BLgbNqox.mjs} +128 -78
- package/dist/{android-Dlzxshgp.mjs → android-CV_GCELZ.mjs} +5 -5
- package/dist/{android-Mz_Inn3w.mjs → android-DUYkNF4u.mjs} +184 -102
- package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-Ct5b1xCK.mjs} +7 -6
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/android-project-BCAAmMwz.mjs +12 -0
- package/dist/api.d.mts +740 -8
- package/dist/api.mjs +585 -1
- package/dist/{artifact-HSwkIWEQ.mjs → artifact-B8T3S5gi.mjs} +223 -201
- package/dist/{artifact-D3czlUvT.mjs → artifact-DAuZ-FNU.mjs} +158 -148
- package/dist/{browser-web-CA-F1GQo.mjs → browser-web-QQzVjz3O.mjs} +26 -24
- package/dist/budget-Bs6SxxzO.mjs +9154 -0
- package/dist/{build-DYDbfkk5.mjs → build-CoPzQRNw.mjs} +144 -96
- package/dist/build-cache-DmyR9Zzc.mjs +602 -0
- package/dist/build-plan-CaFskB7_.mjs +188 -0
- package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DkkqguoK.mjs} +2 -2
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-zdKiYQ3E.mjs → ccache-BJRZ9pG3.mjs} +10 -9
- package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
- package/dist/{chrome-BnzZMqsR.mjs → chrome-B6tfCta1.mjs} +7 -4
- package/dist/{cli-CLP3diBm.mjs → cli-0DYf8QhQ.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/client-B7QVOlCr.d.mts +253 -0
- package/dist/client-UXD70ZbM.mjs +1406 -0
- package/dist/collector-run.d.mts +4 -40
- package/dist/collector-run.mjs +9 -8
- package/dist/{command-output-BTy8hZ0F.mjs → command-output-B1UrjZHL.mjs} +1 -1
- package/dist/config-CYcBF478.mjs +949 -0
- package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-CqeBlrEn.mjs} +3 -3
- package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-BbKQW83h.mjs} +20 -5
- package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
- package/dist/{dev-client-DAWVIGBu.mjs → dev-client-UOeESKm6.mjs} +2 -2
- package/dist/device-DCxH7_By.mjs +1068 -0
- package/dist/{device-BECOiufl.mjs → device-ExJq8Ei7.mjs} +35 -35
- package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-CMlqEcvw.mjs} +43 -13
- package/dist/device-host-worker.mjs +65 -61
- package/dist/{device-ios-COSi6oS1.mjs → device-ios-DRUeKaFV.mjs} +48 -45
- package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
- package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-DMRpVX9a.mjs} +5 -5
- package/dist/doctor-BLHCYxzi.mjs +2 -0
- package/dist/{doctor-kfMBnUw6.mjs → doctor-DTvaDOda.mjs} +281 -317
- package/dist/{doctor-CB8oZKCk.mjs → doctor-Dhqebm0q.mjs} +183 -91
- package/dist/doctor-fingerprint.mjs +19 -0
- package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -21
- package/dist/{eas-build-JyfqyHfC.mjs → eas-build-BomfRnFT.mjs} +53 -20
- package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
- package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
- package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-Bf0rZvG9.mjs} +172 -82
- package/dist/exec-H20xSg2T.d.mts +65 -0
- package/dist/exec-_UbtCQcG.mjs +750 -0
- package/dist/gc-C-WwL0yi.mjs +3 -0
- package/dist/{gc-qWOMdnER.mjs → gc-_-dCXdyL.mjs} +584 -796
- package/dist/git-C3iTsJaZ.mjs +73 -0
- package/dist/{guide-G9cAbVAc.mjs → guide-Yqwt2bd6.mjs} +941 -269
- package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-Bw-honsd.mjs} +8 -6
- package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DB_gBPfY.mjs} +34 -19
- package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
- package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
- package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-QI141yKk.mjs} +21 -17
- package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-Ksyjgzq-.mjs} +30 -21
- package/dist/idle-BVeRGroT.d.mts +24 -0
- package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
- package/dist/{ios-BwVCF7oA.mjs → ios-CQ68hG9s.mjs} +8 -8
- package/dist/{ios-RkW4pnQf.mjs → ios-CpByZy12.mjs} +140 -80
- package/dist/{ios-device-B5veSDDQ.mjs → ios-device-CXGP1bsD.mjs} +1 -1
- package/dist/{ios-device-D7pi2Sca.mjs → ios-device-CwFMehUS.mjs} +51 -26
- package/dist/{ios-project-K9hY_Jab.mjs → ios-project-WuwwBdvW.mjs} +13 -13
- package/dist/{ios-nOLJGVdy.mjs → ios-qNJt4dFm.mjs} +1 -1
- package/dist/ios-signing-DTTIChGs.mjs +489 -0
- package/dist/{ios-state-CBLe1xYw.mjs → ios-state-DvFX-K_l.mjs} +1 -1
- package/dist/{ios-Ce7bc7br.mjs → ios-ubFsBzwq.mjs} +129 -86
- package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Cc1dttps.mjs} +53 -26
- package/dist/{launch-F4sOqAhB.mjs → launch-CD1yVc7U.mjs} +91 -90
- package/dist/{launch-C3qJ6Agb.mjs → launch-Zq2mOSDy.mjs} +82 -541
- package/dist/logs-BS00Anxf.mjs +352 -0
- package/dist/logs-CMm05HxN.mjs +255 -0
- package/dist/{macos-D7uDvO-z.mjs → macos-B65--pPd.mjs} +1 -1
- package/dist/{macos-Ch5VJmcS.mjs → macos-C-0qJ6zq.mjs} +225 -212
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +122 -247
- package/dist/{metro-DnCEjCxs.mjs → metro-DEXpIhHC.mjs} +67 -12
- package/dist/{metro-gateway-CX9Xlkq2.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
- package/dist/{named-ports-4WopRPg-.mjs → named-ports-BWTzt6mu.mjs} +8 -63
- package/dist/native-android-JACyjTZs.mjs +844 -0
- package/dist/{native-gradle-inputs-BsLRrl7u.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -140
- package/dist/native-inputs-TRTTTRxt.mjs +91 -0
- package/dist/native-run-DY_RLx3C.mjs +277 -0
- package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-Dg1Q7tfF.mjs} +9 -8
- package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-CB2iQeWq.mjs} +27 -18
- package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-CXX39F7o.mjs} +96 -47
- package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
- package/dist/offload-worker.d.mts +1 -46
- package/dist/offload-worker.mjs +197 -66
- package/dist/{ownership-DCtw_2IA.mjs → ownership-DEmM5vhh.mjs} +3 -3
- package/dist/{page-DRHy329N.mjs → page-CPaHeYqj.mjs} +7 -4
- package/dist/paths-BsJMoPP2.mjs +12 -0
- package/dist/paths-DQtTgsBf.mjs +42 -0
- package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BqGbTa61.mjs} +5 -5
- package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
- package/dist/{ports-DdSUicVo.mjs → ports-D-MmCTdv.mjs} +3 -3
- package/dist/prebuild-uD_ipCxF.mjs +449 -0
- package/dist/{project-_phNIJfs.mjs → project-BZNjmW_8.mjs} +65 -37
- package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-Lfetn8Kr.mjs} +2 -2
- package/dist/pull-request-zjCSAryH.d.mts +120 -0
- package/dist/pull-requests.d.mts +1 -119
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-DuzH0cn3.mjs} +74 -48
- package/dist/{gradle-DSrXb6lG.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
- package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
- package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
- package/dist/{recordings-D0d5aQt0.mjs → recordings-DYteQSu4.mjs} +12 -9
- package/dist/{reload-C8JhxjSh.mjs → reload-CmTRFJaX.mjs} +93 -47
- package/dist/reload-DzjSl5P_.mjs +2 -0
- package/dist/{remote-BiR6aYjy.mjs → remote-ByYkXdGD.mjs} +15 -10
- package/dist/result-DNiS-tTP.mjs +434 -0
- package/dist/{run-BtPgpKks.mjs → run-D23HmJMs.mjs} +4 -5
- package/dist/selection-CSl9i5qU.mjs +619 -0
- package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CxTrvDg8.mjs} +3 -4
- package/dist/{server-command-CTtCkmcQ.mjs → server-command-CtzloH3v.mjs} +14 -7
- package/dist/server-expo-C-90EhcG.mjs +2 -0
- package/dist/{server-expo-DsguMGUF.mjs → server-expo-DT_F_uVI.mjs} +50 -9
- package/dist/{settings-B717odTD.mjs → settings-CsJDEXgK.mjs} +234 -24
- package/dist/{settings-vk3mJGSm.d.mts → settings-DkdmlelE.d.mts} +6 -4
- package/dist/settings-T1gtc3bf.mjs +114 -0
- package/dist/settings-write-HyVZ8eQ8.mjs +359 -0
- package/dist/settings.schema.json +163 -16
- package/dist/{simslim-CCr3rE-A.mjs → simslim-Cgk17SXV.mjs} +14 -12
- package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-DF8VfT64.mjs} +15 -20
- package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
- package/dist/stage-BIS0ydsV.mjs +183 -0
- package/dist/{start-BWqzODpb.mjs → start-7lpH7hmN.mjs} +63 -44
- package/dist/{start-TXeMmmO2.mjs → start-RChynRDp.mjs} +1 -1
- package/dist/{state-D1Icyjlu.mjs → state-C4ZtUisW.mjs} +40 -13
- package/dist/{state-CG_OFoaA.mjs → state-XMziexv2.mjs} +3 -2
- package/dist/{stats-BoY5sEPU.mjs → stats-53T7OTb9.mjs} +7 -13
- package/dist/stats-report-BFfMpWWF.mjs +16 -0
- package/dist/{status-WgFbkRzj.mjs → status-BL7jVyAB.mjs} +535 -447
- package/dist/status-CSi6tlRq.mjs +2 -0
- package/dist/{status-BTA7kKiQ.mjs → status-DqEUSSxs.mjs} +6 -4
- package/dist/{status-watch-C23ILtf9.mjs → status-watch-GDCfqpTE.mjs} +187 -22
- package/dist/status-worker.d.mts +1 -0
- package/dist/status-worker.mjs +19 -0
- package/dist/stim-desktop-C12we7lz.mjs +112 -0
- package/dist/{stop-DR6VoDIk.mjs → stop-Bk_1qiV6.mjs} +2 -2
- package/dist/{stop-BNmBMi1F.mjs → stop-CPzlM1L-.mjs} +138 -98
- package/dist/{stop-DPEhunlw.mjs → stop-D7h6jAXQ.mjs} +11 -10
- package/dist/supervisor-run.d.mts +8 -17
- package/dist/supervisor-run.mjs +63 -27
- package/dist/{support-DMTqj3Hm.mjs → support-67vraa1Q.mjs} +18 -11
- package/dist/{support-CwjbFs9H.mjs → support-Dlu37g6H.mjs} +12 -12
- package/dist/{swiftpm-macos-DRNVJWlb.mjs → swiftpm-macos-p8WZbxKU.mjs} +35 -24
- package/dist/toolchain-DhKwp9iI.mjs +2 -0
- package/dist/toolchain-Hp9sCpK4.mjs +873 -0
- package/dist/{trigger-CigAYjeL.mjs → trigger-BAahxUPq.mjs} +20 -5
- package/dist/trigger-Bf3uDcpv.mjs +2 -0
- package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-BHX5r0Ei.mjs} +250 -156
- package/dist/{web-BDBMxDpx.mjs → web-CJmIj6AI.mjs} +18 -13
- package/dist/web-DknQETPs.mjs +2 -0
- package/dist/web-run.mjs +11 -12
- package/dist/windows-report.d.mts +1 -0
- package/dist/windows-report.mjs +18 -0
- package/dist/windows-report.ps1 +43 -0
- package/dist/workspace-process-lock-1_1OoVW5.mjs +57 -0
- package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-Cjuigeeu.mjs} +62 -58
- package/dist/{workspaces-C36s2jb9.mjs → workspaces-BccMFmGQ.mjs} +1188 -1079
- package/dist/worktree-CK2MpJW5.mjs +2 -0
- package/dist/{worktree-CgvJYJ-Q.mjs → worktree-DQ6Zi2Mv.mjs} +304 -53
- package/dist/xcode-Zlx3qjEs.mjs +896 -0
- package/package.json +7 -5
- package/shim/android-optimizations.gradle +7 -5
- package/dist/activity-BSV745Kz.mjs +0 -629
- package/dist/api-qvOzWyfO.mjs +0 -154
- package/dist/api-run.mjs +0 -294
- package/dist/app-install-BIKtMfPq.mjs +0 -896
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
- package/dist/budget-f7516Zk0.mjs +0 -4106
- package/dist/build-facts-DcLv2HSd.d.mts +0 -111
- package/dist/cancellation-C_22VQTH.mjs +0 -24
- package/dist/client-qQAaXSUs.mjs +0 -1771
- package/dist/config-BYDxlMY3.mjs +0 -562
- package/dist/device-DuiPJQSn.mjs +0 -290
- package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
- package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
- package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
- package/dist/exec-DqKo9GKJ.mjs +0 -268
- package/dist/git-DDfFzkMm.mjs +0 -45
- package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
- package/dist/logs-BGrEUaEs.mjs +0 -383
- package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
- package/dist/native-android-D5qc3-_v.mjs +0 -226
- package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
- package/dist/plan-C4TjdPsR.mjs +0 -260
- package/dist/prebuild-DYbucPXy.mjs +0 -212
- package/dist/preview-78a9kR_-.mjs +0 -1011
- package/dist/react-native-build-CtCccJtb.mjs +0 -239
- package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
- package/dist/remote-cache-OyOyVIS3.mjs +0 -526
- package/dist/result-CaJg5Iat.mjs +0 -186
- package/dist/server-expo-Bigriskl.mjs +0 -2
- package/dist/settings-BORNaaCO.mjs +0 -402
- package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
- package/dist/stage-KNTQopqv.mjs +0 -157
- package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
- package/dist/tailnet-Dh-qiYzG.mjs +0 -265
- package/dist/toolchain-BFkAcstd.mjs +0 -2
- package/dist/toolchain-DxSsNssu.mjs +0 -1657
- package/dist/trigger-9_USgmxz.mjs +0 -2
- package/dist/web-Dq-i3wzJ.mjs +0 -2
- package/dist/worktree-DpLdCHga.mjs +0 -2
- package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
- package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import { S as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { d as withDrainingCancellation, f as ownership_claim_exports } from "./exec-_UbtCQcG.mjs";
|
|
2
|
+
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-B1UrjZHL.mjs";
|
|
4
|
+
import { en as throwIfCancelled } from "./settings-CsJDEXgK.mjs";
|
|
5
|
+
import { Hn as isEasAuthFailureText, Ln as RESOLVE_TIMEOUT_MS, Vn as easAuthNote } from "./budget-Bs6SxxzO.mjs";
|
|
6
|
+
import { d as runCancellationSignal, r as cancelledFailure } from "./native-run-DY_RLx3C.mjs";
|
|
7
|
+
import { d as prepareProviderDownloadDir, f as providerDownloadPath, p as providerUploadOutcome } from "./build-cache-DmyR9Zzc.mjs";
|
|
8
|
+
import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-Zlx3qjEs.mjs";
|
|
9
|
+
import { c as offloadPlacement, i as closeOffload, l as placementLoad, m as clearCorruptCompilationCache, n as buildPlacementCandidates, o as offloadBuild, p as COMPILATION_CACHE_CORRUPT, r as chooseBuildMachine, u as remotePhaseText } from "./client-UXD70ZbM.mjs";
|
|
10
|
+
import { a as requireLocalBuild, r as namedBuildMachine, t as OffloadRefusal } from "./selection-CSl9i5qU.mjs";
|
|
11
|
+
import { S as xcodeFailureReport, p as printDiagnostics } from "./support-Dlu37g6H.mjs";
|
|
12
|
+
import { c as skippedMissReason } from "./prebuild-uD_ipCxF.mjs";
|
|
13
|
+
import { t as buildPlacementRecord } from "./placement-log-BqGbTa61.mjs";
|
|
14
|
+
import { t as acquireArtifact } from "./acquire-artifact-CD4lbiWE.mjs";
|
|
15
|
+
import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-WuwwBdvW.mjs";
|
|
14
16
|
import { rmSync } from "node:fs";
|
|
15
17
|
import { join } from "node:path";
|
|
16
18
|
import { machineCapacity } from "@stim-cli/core/state";
|
|
17
|
-
import { createWarnOnce, resolveTieredBuild, storeTieredBuild } from "@stim-cli/cache";
|
|
18
19
|
import chalk from "chalk";
|
|
20
|
+
import { PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, buildResolveTimeoutMs, buildUploadTimeoutMs, createWarnOnce, resolveTieredBuild, storeTieredBuild, timeoutFromEnv } from "@stim-cli/cache";
|
|
19
21
|
//#region src/commands/ios/artifact.ts
|
|
20
22
|
const PROVIDER_SKIPPED_ON_DEVICE = "a device build is local-tier only: its cache key names the iphoneos slice, and a remote or provider entry is keyed for the simulator";
|
|
21
23
|
function fail(failure) {
|
|
22
24
|
throw new IosRecipeRefusal(failure);
|
|
23
25
|
}
|
|
24
|
-
async function acquireIosArtifact({ root, logFile, recipe, physical, configuration, buildMachine = "auto", cache, easBuild, maxBuilds, progress }, d) {
|
|
26
|
+
async function acquireIosArtifact({ context, root, logFile, recipe, physical, configuration, buildMachine = "auto", cache, easBuild, maxBuilds, progress }, d) {
|
|
25
27
|
const { phase, note, logWriter, stats, step, miss, hit: lateHit, place, waitingOn, waitingFor } = progress;
|
|
26
28
|
const cachePolicy = cache.policy;
|
|
27
|
-
const signal = runCancellationSignal() ??
|
|
29
|
+
const signal = runCancellationSignal(context) ?? context.signal;
|
|
28
30
|
const cacheTarget = (key) => ({
|
|
29
31
|
projectRoot: root,
|
|
30
32
|
platform: "ios",
|
|
@@ -35,40 +37,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
35
37
|
let cacheIneligible = null;
|
|
36
38
|
const cacheProviderConfig = cache.providerConfig;
|
|
37
39
|
let compilationCache = COMPILATION_CACHE_NOT_RUN;
|
|
38
|
-
|
|
39
|
-
const releaseArtifact = () => {
|
|
40
|
-
for (const directory of temporaryDirs) {
|
|
41
|
-
try {
|
|
42
|
-
rmSync(directory, {
|
|
43
|
-
recursive: true,
|
|
44
|
-
force: true
|
|
45
|
-
});
|
|
46
|
-
} catch {}
|
|
47
|
-
temporaryDirs.delete(directory);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
let buildLock = null;
|
|
51
|
-
const releaseLock = () => {
|
|
52
|
-
if (!buildLock) return;
|
|
53
|
-
const held = buildLock;
|
|
54
|
-
buildLock = null;
|
|
55
|
-
try {
|
|
56
|
-
d.releaseBuildLock(held);
|
|
57
|
-
} catch (e) {
|
|
58
|
-
note(chalk.dim(`Could not release the build lock at ${held.path}: ${e?.message || e}`));
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
let buildSlot = null;
|
|
62
|
-
const releaseSlot = () => {
|
|
63
|
-
if (!buildSlot) return;
|
|
64
|
-
const held = buildSlot;
|
|
65
|
-
buildSlot = null;
|
|
66
|
-
try {
|
|
67
|
-
d.releaseBuildSlot(held);
|
|
68
|
-
} catch (e) {
|
|
69
|
-
note(chalk.dim(`Could not release the build slot: ${e?.message || e}`));
|
|
70
|
-
}
|
|
71
|
-
};
|
|
40
|
+
let run;
|
|
72
41
|
let fingerprint = "";
|
|
73
42
|
let cacheKey = "";
|
|
74
43
|
let storeHash = null;
|
|
@@ -80,7 +49,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
80
49
|
let handoff = null;
|
|
81
50
|
let offloadFallback = null;
|
|
82
51
|
let fallbackMachine = null;
|
|
83
|
-
let hereReason = "no remote
|
|
52
|
+
let hereReason = "no remote machine is paired";
|
|
84
53
|
let slotWaitMs;
|
|
85
54
|
let builtOn;
|
|
86
55
|
const fallBack = (reason, line = reason, info = {}) => {
|
|
@@ -104,7 +73,6 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
104
73
|
};
|
|
105
74
|
phase("build", `${line} -> building here`);
|
|
106
75
|
};
|
|
107
|
-
const openOffload = { choice: null };
|
|
108
76
|
let remote = null;
|
|
109
77
|
let abandonedRemote = false;
|
|
110
78
|
let uploadPending = null;
|
|
@@ -114,7 +82,8 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
114
82
|
const cacheWarn = createWarnOnce((line) => note(chalk.yellow(phaseLine("cache", line))));
|
|
115
83
|
const loadProvider = cachePolicy.remote && cacheProviderConfig && !physical ? () => providerLoad ??= d.loadCacheProvider({
|
|
116
84
|
projectRoot: root,
|
|
117
|
-
config: cacheProviderConfig
|
|
85
|
+
config: cacheProviderConfig,
|
|
86
|
+
timeoutMs: timeoutFromEnv(PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, context.env)
|
|
118
87
|
}) : null;
|
|
119
88
|
if (cacheProviderConfig && physical) note(chalk.dim(phaseLine("cache", PROVIDER_SKIPPED_ON_DEVICE)));
|
|
120
89
|
let waitedForBuild = null;
|
|
@@ -130,7 +99,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
130
99
|
cacheHit = easBuild.cacheHit;
|
|
131
100
|
providerName = "eas";
|
|
132
101
|
stats.setCacheKey(cacheKey);
|
|
133
|
-
recipe.validateExternal(appPath);
|
|
102
|
+
await recipe.validateExternal(appPath);
|
|
134
103
|
return;
|
|
135
104
|
}
|
|
136
105
|
if (useBuildCache) step("cache-lookup");
|
|
@@ -147,7 +116,8 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
147
116
|
stats.setCacheKey(cacheKey);
|
|
148
117
|
storeHash = fingerprint;
|
|
149
118
|
storeKey = cacheKey;
|
|
150
|
-
const found = await resolveTieredBuild({
|
|
119
|
+
const found = await withDrainingCancellation(context, signal, () => resolveTieredBuild({
|
|
120
|
+
timeoutMs: buildResolveTimeoutMs(context.env),
|
|
151
121
|
local: recipe.cache(),
|
|
152
122
|
loadProvider,
|
|
153
123
|
target: {
|
|
@@ -156,10 +126,11 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
156
126
|
key: cacheKey
|
|
157
127
|
},
|
|
158
128
|
destinationDir: providerDownloadPath(workspaceDir(root)),
|
|
159
|
-
ensureDestination: prepareProviderDownloadDir,
|
|
129
|
+
ensureDestination: (dir) => prepareProviderDownloadDir(dir, root),
|
|
160
130
|
skipRead: !useBuildCache,
|
|
161
|
-
warn: cacheWarn
|
|
162
|
-
|
|
131
|
+
warn: cacheWarn,
|
|
132
|
+
signal
|
|
133
|
+
}));
|
|
163
134
|
const cached = found?.tier === "local" ? found.path : null;
|
|
164
135
|
cacheHit = cached ? "local" : false;
|
|
165
136
|
phase("fingerprint", `${shortHash(fingerprint)} ${cached ? "hit" : "miss"}${useBuildCache ? "" : cache.disabledByFlag ? " (--no-build-cache)" : " (cache reuse off in config)"} ${fingerprintTimer()}`);
|
|
@@ -177,7 +148,8 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
177
148
|
if (loaded?.unavailable) note(chalk.yellow(phaseLine("cache", `provider not usable: ${loaded.unavailable}`)));
|
|
178
149
|
else if (loaded?.provider) remote = loaded;
|
|
179
150
|
if (remote?.name === "eas") {
|
|
180
|
-
const auth = d.checkEasAuth({
|
|
151
|
+
const auth = await d.checkEasAuth({
|
|
152
|
+
context,
|
|
181
153
|
projectRoot: root,
|
|
182
154
|
owner: loaded?.owner || null
|
|
183
155
|
});
|
|
@@ -189,6 +161,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
189
161
|
if (remote && useBuildCache) {
|
|
190
162
|
const remoteTimer = stepTimer(d.now);
|
|
191
163
|
const hit = await d.resolveRemote({
|
|
164
|
+
context,
|
|
192
165
|
logWriter: logWriter(),
|
|
193
166
|
provider: remote.provider,
|
|
194
167
|
platform: "ios",
|
|
@@ -205,6 +178,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
205
178
|
overwrite: false
|
|
206
179
|
}) ?? null;
|
|
207
180
|
} catch (e) {
|
|
181
|
+
throwIfCancelled(signal, "build cache backfill");
|
|
208
182
|
note(chalk.yellow(phaseLine("cache", `remote hit could not be stored locally: ${e?.message || e}`)));
|
|
209
183
|
}
|
|
210
184
|
appPath = stored || hit.appPath;
|
|
@@ -225,16 +199,9 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
225
199
|
}
|
|
226
200
|
async function awaitSharedBuild() {
|
|
227
201
|
if (!useBuildCache || appPath) return;
|
|
228
|
-
const shared = await
|
|
229
|
-
platform: "ios",
|
|
202
|
+
const shared = await run.claimSharedBuild({
|
|
230
203
|
key: cacheKey,
|
|
231
204
|
fingerprint,
|
|
232
|
-
root,
|
|
233
|
-
logFile,
|
|
234
|
-
command: "stim ios",
|
|
235
|
-
acquire: d.acquireBuildLock,
|
|
236
|
-
wait: d.waitForBuild,
|
|
237
|
-
now: d.now,
|
|
238
205
|
phase: (text) => {
|
|
239
206
|
step("wait");
|
|
240
207
|
phase("build", text);
|
|
@@ -252,7 +219,6 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
252
219
|
cacheSkipped: !useBuildCache
|
|
253
220
|
}
|
|
254
221
|
});
|
|
255
|
-
buildLock = shared.lock;
|
|
256
222
|
releasedWait = shared.released;
|
|
257
223
|
if (shared.hit) {
|
|
258
224
|
appPath = shared.hit.path;
|
|
@@ -263,7 +229,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
263
229
|
const installableCachedApp = async (path) => {
|
|
264
230
|
const prepared = await recipe.materialize(path, {
|
|
265
231
|
fresh: false,
|
|
266
|
-
ownTemporary: (directory) =>
|
|
232
|
+
ownTemporary: (directory) => run.own(directory)
|
|
267
233
|
});
|
|
268
234
|
if (!prepared) swapFellBack = true;
|
|
269
235
|
return prepared;
|
|
@@ -321,16 +287,15 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
321
287
|
requireLocalBuild(buildMachine);
|
|
322
288
|
if (!maxBuilds) return;
|
|
323
289
|
try {
|
|
324
|
-
|
|
290
|
+
slotWaitMs = (await run.takeBuildSlot({
|
|
291
|
+
signal,
|
|
325
292
|
automatic: buildMachine === "auto",
|
|
326
293
|
max: maxBuilds,
|
|
327
|
-
root,
|
|
328
|
-
logFile,
|
|
329
294
|
out: note,
|
|
330
295
|
waitingFor: (info) => waitingFor?.(info, "build-slot")
|
|
331
|
-
});
|
|
332
|
-
slotWaitMs = buildSlot.slotWaitMs;
|
|
296
|
+
})).slotWaitMs;
|
|
333
297
|
} catch (e) {
|
|
298
|
+
throwIfCancelled(signal, "iOS build");
|
|
334
299
|
requireLocalBuild(buildMachine);
|
|
335
300
|
const refusal = (0, ownership_claim_exports.claimFailure)(e, "stim ios");
|
|
336
301
|
if (refusal) fail({
|
|
@@ -342,8 +307,8 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
342
307
|
note(chalk.yellow(phaseLine("build", `could not take a build slot: ${e?.message || e}; building anyway`)));
|
|
343
308
|
}
|
|
344
309
|
}
|
|
345
|
-
/** Whether this build should leave this
|
|
346
|
-
function placeBuild() {
|
|
310
|
+
/** Whether this build should leave this machine, before any machine is asked; null builds here. */
|
|
311
|
+
async function placeBuild() {
|
|
347
312
|
if (cacheIneligible) {
|
|
348
313
|
if (namedBuildMachine(buildMachine)) throw new OffloadRefusal(buildMachine, cacheIneligible);
|
|
349
314
|
hereReason = cacheIneligible;
|
|
@@ -354,7 +319,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
354
319
|
const { runtime, unsupported } = mode === "off" && !namedBuildMachine(buildMachine) ? {
|
|
355
320
|
runtime: null,
|
|
356
321
|
unsupported: null
|
|
357
|
-
} : recipe.offload?.context() ?? {
|
|
322
|
+
} : await recipe.offload?.context() ?? {
|
|
358
323
|
runtime: null,
|
|
359
324
|
unsupported: "this project integration does not support offloaded builds"
|
|
360
325
|
};
|
|
@@ -369,6 +334,15 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
369
334
|
});
|
|
370
335
|
if (!placement.offload) {
|
|
371
336
|
hereReason = placement.reason;
|
|
337
|
+
if (placement.code === "this-mac-free" && runtime && useBuildCache && cachePolicy.remote && recipe.offload?.request(runtime).native?.provider === "xcode") return {
|
|
338
|
+
cacheOnly: true,
|
|
339
|
+
mode,
|
|
340
|
+
here,
|
|
341
|
+
code: placement.code,
|
|
342
|
+
reason: placement.reason,
|
|
343
|
+
runtime,
|
|
344
|
+
machines
|
|
345
|
+
};
|
|
372
346
|
logWriter().write(buildPlacementRecord({
|
|
373
347
|
platform: "ios",
|
|
374
348
|
buildMachine,
|
|
@@ -381,6 +355,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
381
355
|
return null;
|
|
382
356
|
}
|
|
383
357
|
return {
|
|
358
|
+
cacheOnly: false,
|
|
384
359
|
mode,
|
|
385
360
|
here,
|
|
386
361
|
code: placement.code,
|
|
@@ -391,18 +366,26 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
391
366
|
}
|
|
392
367
|
/** Asks the paired machines once the post-mutation key is known; null builds here. */
|
|
393
368
|
async function chooseMachine(candidate) {
|
|
369
|
+
const offload = recipe.offload;
|
|
370
|
+
if (!offload) return null;
|
|
394
371
|
let asked = [];
|
|
395
372
|
const choice = await chooseBuildMachine({
|
|
396
373
|
projectRoot: root,
|
|
397
|
-
target:
|
|
374
|
+
target: await offload.target(candidate.runtime),
|
|
398
375
|
mode: candidate.mode,
|
|
399
376
|
here: candidate.here,
|
|
400
377
|
note: (line) => note(chalk.dim(phaseLine("build", `offload: ${line}`))),
|
|
401
378
|
machines: candidate.machines,
|
|
402
379
|
selected: buildMachine,
|
|
403
|
-
onCandidates: (each) => asked = each
|
|
380
|
+
onCandidates: (each) => asked = each,
|
|
381
|
+
cacheOnly: candidate.cacheOnly,
|
|
382
|
+
...useBuildCache && cachePolicy.remote && storeHash && storeKey && offload.request(candidate.runtime).native?.provider === "xcode" ? { artifact: {
|
|
383
|
+
fingerprint: storeHash,
|
|
384
|
+
cacheKey: storeKey
|
|
385
|
+
} } : {}
|
|
404
386
|
});
|
|
405
387
|
if (typeof choice === "string") {
|
|
388
|
+
if (candidate.cacheOnly) return null;
|
|
406
389
|
const only = candidate.machines.length === 1 ? candidate.machines[0].machine : null;
|
|
407
390
|
if (only && choice.startsWith(`${only}: `)) fallbackMachine = only;
|
|
408
391
|
fallBack(choice, choice, {
|
|
@@ -411,7 +394,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
411
394
|
});
|
|
412
395
|
return null;
|
|
413
396
|
}
|
|
414
|
-
openOffload
|
|
397
|
+
run.openOffload(() => closeOffload(choice));
|
|
415
398
|
logWriter().write(buildPlacementRecord({
|
|
416
399
|
platform: "ios",
|
|
417
400
|
buildMachine,
|
|
@@ -479,13 +462,22 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
479
462
|
force: true
|
|
480
463
|
});
|
|
481
464
|
} catch {}
|
|
465
|
+
throwIfCancelled(signal, "offloaded build cache copy");
|
|
482
466
|
step("compile");
|
|
483
467
|
const prepared = stored ? await installableCachedApp(stored) : null;
|
|
484
468
|
if (!outcome.ok || !prepared) {
|
|
485
469
|
const why = reason ?? "the stored app is not installable";
|
|
470
|
+
if (candidate.cacheOnly) return false;
|
|
486
471
|
fallbackMachine = choice.machine;
|
|
472
|
+
const corrupt = outcome.ok ? void 0 : outcome.compilationCacheCorrupt;
|
|
473
|
+
if (corrupt !== void 0 && namedBuildMachine(buildMachine)) fail({
|
|
474
|
+
code: COMPILATION_CACHE_CORRUPT,
|
|
475
|
+
message: `${choice.machine}: ${corrupt}`,
|
|
476
|
+
remedy: `Run the same command again. If the message says Stim did not empty the cache on ${choice.machine}, rerun with --remote-build local to build here.`,
|
|
477
|
+
build: buildFailure
|
|
478
|
+
});
|
|
487
479
|
fallBack(`${choice.machine}: ${why}`, `offload failed: ${why}`, {
|
|
488
|
-
code: "offload-failed",
|
|
480
|
+
code: corrupt === void 0 ? "offload-failed" : COMPILATION_CACHE_CORRUPT,
|
|
489
481
|
machine: choice.machine
|
|
490
482
|
});
|
|
491
483
|
logWriter().write({
|
|
@@ -499,6 +491,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
499
491
|
}
|
|
500
492
|
const { timings } = outcome;
|
|
501
493
|
appPath = prepared;
|
|
494
|
+
if (outcome.cacheHit) cacheHit = "remote";
|
|
502
495
|
builtOn = outcome.machine;
|
|
503
496
|
offloadedTo = outcome.machine;
|
|
504
497
|
handoff = outcome.handoff ?? null;
|
|
@@ -508,14 +501,14 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
508
501
|
reason: `${candidate.reason}${placementLoad(choice)}`,
|
|
509
502
|
buildMs: timings.totalMs
|
|
510
503
|
});
|
|
511
|
-
phase("build",
|
|
504
|
+
phase("build", `${outcome.cacheHit ? "reused artifact from" : "built on"} ${outcome.machine} in ${formatDuration(timings.totalMs)}: offer ${formatDuration(timings.offerMs)}, sync ${formatDuration(timings.syncMs)}, build ${formatDuration(timings.workerMs)}, fetch ${formatDuration(timings.fetchMs)}`);
|
|
512
505
|
compilationCache = outcome.compilationCache;
|
|
513
506
|
phase("cache", `compilation cache on ${outcome.machine} ${compilationCacheActivityLine(compilationCache)}`);
|
|
514
507
|
logWriter().write({
|
|
515
508
|
src: "build",
|
|
516
509
|
level: "info",
|
|
517
510
|
event: "offload_done",
|
|
518
|
-
msg:
|
|
511
|
+
msg: `${outcome.cacheHit ? "reused artifact from" : "built on"} ${outcome.machine}`,
|
|
519
512
|
timings
|
|
520
513
|
});
|
|
521
514
|
return true;
|
|
@@ -575,7 +568,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
575
568
|
async function compileHere(offload, { rekeyedBy }) {
|
|
576
569
|
if (!offload) explainMiss(rekeyedBy);
|
|
577
570
|
step("compile");
|
|
578
|
-
if (offload) stats.setPlacement({
|
|
571
|
+
if (offload && !offload.cacheOnly) stats.setPlacement({
|
|
579
572
|
decision: "fell-back",
|
|
580
573
|
slotWaitMs,
|
|
581
574
|
deviceSlotWaitMs: stats.deviceSlotWaitMs(),
|
|
@@ -601,9 +594,12 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
601
594
|
if (!result.ok) {
|
|
602
595
|
phase("build", `FAILED after ${formatDuration(result.durationMs)}`);
|
|
603
596
|
printDiagnostics(note, result);
|
|
604
|
-
const report =
|
|
605
|
-
fail({
|
|
597
|
+
const report = result.compilationCacheCorruption ? clearCorruptCompilationCache(result.compilationCacheCorruption, root) : {
|
|
606
598
|
code: result.code,
|
|
599
|
+
...xcodeFailureReport(result, logFile)
|
|
600
|
+
};
|
|
601
|
+
fail({
|
|
602
|
+
code: report.code,
|
|
607
603
|
message: report.message,
|
|
608
604
|
remedy: report.remedy,
|
|
609
605
|
logPath: logFile,
|
|
@@ -620,30 +616,38 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
620
616
|
return appPath;
|
|
621
617
|
}
|
|
622
618
|
async function storeArtifact(artifactPath) {
|
|
623
|
-
if (storeKey && cachePolicy.write)
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
619
|
+
if (storeKey && cachePolicy.write) {
|
|
620
|
+
const key = storeKey;
|
|
621
|
+
try {
|
|
622
|
+
const stored = await withDrainingCancellation(context, signal, () => storeTieredBuild({
|
|
623
|
+
timeoutMs: buildUploadTimeoutMs(context.env),
|
|
624
|
+
local: recipe.cache(),
|
|
625
|
+
loadProvider,
|
|
626
|
+
target: {
|
|
627
|
+
projectRoot: root,
|
|
628
|
+
platform: "ios",
|
|
629
|
+
key
|
|
630
|
+
},
|
|
631
|
+
sourcePath: artifactPath,
|
|
632
|
+
overwrite: !useBuildCache || swapFellBack,
|
|
633
|
+
warn: cacheWarn,
|
|
634
|
+
signal
|
|
635
|
+
}));
|
|
636
|
+
const pending = stored.providerUpload;
|
|
637
|
+
providerUpload = pending ? withDrainingCancellation(context, signal, () => pending) : null;
|
|
638
|
+
providerUpload?.catch(() => {});
|
|
639
|
+
providerName = stored.providerName ?? providerName;
|
|
640
|
+
} catch (e) {
|
|
641
|
+
throwIfCancelled(signal, "build cache storage");
|
|
642
|
+
note(chalk.yellow(`Could not store the build in the shared cache: ${e?.message || e}`));
|
|
643
|
+
}
|
|
640
644
|
}
|
|
641
645
|
}
|
|
642
646
|
async function finishArtifact(artifactPath) {
|
|
643
647
|
let installPath = artifactPath;
|
|
644
648
|
const prepared = await recipe.materialize(installPath, {
|
|
645
649
|
fresh: true,
|
|
646
|
-
ownTemporary: (directory) =>
|
|
650
|
+
ownTemporary: (directory) => run.own(directory)
|
|
647
651
|
});
|
|
648
652
|
if (!prepared) fail({
|
|
649
653
|
code: "STIM_INSTALL_FAILED",
|
|
@@ -656,6 +660,7 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
656
660
|
});
|
|
657
661
|
installPath = prepared;
|
|
658
662
|
if (remote && !physical && storeHash) uploadPending = d.uploadRemote({
|
|
663
|
+
context,
|
|
659
664
|
logWriter: logWriter(),
|
|
660
665
|
provider: remote.provider,
|
|
661
666
|
platform: "ios",
|
|
@@ -666,65 +671,113 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
666
671
|
});
|
|
667
672
|
return installPath;
|
|
668
673
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
return appPath;
|
|
689
|
-
} : void 0,
|
|
690
|
-
reuse: async (cached) => {
|
|
691
|
-
appPath = await prepareCachedArtifact(cached);
|
|
692
|
-
if (appPath) lateHit();
|
|
693
|
-
else if (swapFellBack) miss(reasonForMiss([]).reason);
|
|
694
|
-
return appPath;
|
|
695
|
-
},
|
|
696
|
-
build: {
|
|
697
|
-
placement: {
|
|
698
|
-
select: () => {
|
|
699
|
-
buildFailure = {
|
|
700
|
-
fingerprint,
|
|
701
|
-
cacheKey,
|
|
702
|
-
cacheHit,
|
|
703
|
-
cacheSkipped: !useBuildCache,
|
|
704
|
-
buildMachine
|
|
705
|
-
};
|
|
706
|
-
return placeBuild();
|
|
707
|
-
},
|
|
708
|
-
acquire: acquireRemoteArtifact
|
|
674
|
+
const acquired = await acquireArtifact({
|
|
675
|
+
platform: "ios",
|
|
676
|
+
command: "stim ios",
|
|
677
|
+
lifecycle: (driver) => {
|
|
678
|
+
run = driver;
|
|
679
|
+
return {
|
|
680
|
+
resolve: async () => {
|
|
681
|
+
await resolveInitialFingerprint();
|
|
682
|
+
if (easBuild) return {
|
|
683
|
+
kind: "ready",
|
|
684
|
+
artifact: appPath
|
|
685
|
+
};
|
|
686
|
+
remote = await resolveRemoteArtifact();
|
|
687
|
+
if (appPath) return {
|
|
688
|
+
kind: "cached",
|
|
689
|
+
artifact: appPath
|
|
690
|
+
};
|
|
691
|
+
miss(reasonForMiss([]).reason);
|
|
692
|
+
return { kind: "miss" };
|
|
709
693
|
},
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
await
|
|
716
|
-
|
|
694
|
+
claim: useBuildCache ? async () => {
|
|
695
|
+
await awaitSharedBuild();
|
|
696
|
+
return appPath;
|
|
697
|
+
} : void 0,
|
|
698
|
+
reuse: async (cached) => {
|
|
699
|
+
appPath = await prepareCachedArtifact(cached);
|
|
700
|
+
if (appPath) lateHit();
|
|
701
|
+
else if (swapFellBack) miss(reasonForMiss([]).reason);
|
|
702
|
+
return appPath;
|
|
717
703
|
},
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
704
|
+
build: {
|
|
705
|
+
placement: {
|
|
706
|
+
select: () => {
|
|
707
|
+
buildFailure = {
|
|
708
|
+
fingerprint,
|
|
709
|
+
cacheKey,
|
|
710
|
+
cacheHit,
|
|
711
|
+
cacheSkipped: !useBuildCache,
|
|
712
|
+
buildMachine
|
|
713
|
+
};
|
|
714
|
+
return placeBuild();
|
|
715
|
+
},
|
|
716
|
+
acquire: acquireRemoteArtifact
|
|
717
|
+
},
|
|
718
|
+
admit: takeBuildSlot,
|
|
719
|
+
prepare: prepareSource,
|
|
720
|
+
revalidate: revalidateSource,
|
|
721
|
+
compile: compileHere,
|
|
722
|
+
validate: async () => {
|
|
723
|
+
await settleStoreKeyAfterCompile();
|
|
724
|
+
return storeKey ? "cacheable" : "uncacheable";
|
|
725
|
+
},
|
|
726
|
+
store: storeArtifact,
|
|
727
|
+
finish: finishArtifact
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
},
|
|
731
|
+
settleFailed: async () => {
|
|
732
|
+
await Promise.allSettled([uploadPending, providerUpload]);
|
|
733
|
+
},
|
|
734
|
+
refuse: (error) => {
|
|
735
|
+
if (error instanceof OffloadRefusal) return {
|
|
736
|
+
code: error.code,
|
|
737
|
+
message: error.message,
|
|
738
|
+
remedy: error.remedy,
|
|
739
|
+
build: {
|
|
740
|
+
...buildFailure,
|
|
741
|
+
buildMachine,
|
|
742
|
+
...builtOn ? { builtOn } : {}
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
if (error instanceof IosRecipeRefusal) return {
|
|
746
|
+
...error.failure,
|
|
747
|
+
build: {
|
|
748
|
+
...buildFailure,
|
|
749
|
+
...error.failure.build
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
const cancelled = cancelledFailure(context, "ios", {
|
|
753
|
+
code: "STIM_CANCELLED",
|
|
754
|
+
message: "during app preparation"
|
|
755
|
+
});
|
|
756
|
+
return cancelled ? {
|
|
757
|
+
...cancelled,
|
|
758
|
+
build: {
|
|
759
|
+
...buildFailure,
|
|
760
|
+
buildMachine,
|
|
761
|
+
...builtOn ? { builtOn } : {}
|
|
762
|
+
}
|
|
763
|
+
} : null;
|
|
764
|
+
},
|
|
765
|
+
releaseFailed: (subject, e) => note(chalk.dim(`Could not release ${subject}: ${e?.message || e}`)),
|
|
766
|
+
temporaryReleaseFailed: () => {}
|
|
767
|
+
}, {
|
|
768
|
+
root,
|
|
769
|
+
logFile,
|
|
770
|
+
deps: d
|
|
771
|
+
});
|
|
772
|
+
if (!acquired.ok) return {
|
|
773
|
+
ok: false,
|
|
774
|
+
failure: acquired.failure,
|
|
775
|
+
compilationCache
|
|
776
|
+
};
|
|
777
|
+
appPath = acquired.artifact;
|
|
778
|
+
return {
|
|
779
|
+
ok: true,
|
|
780
|
+
artifact: {
|
|
728
781
|
handoff,
|
|
729
782
|
path: appPath,
|
|
730
783
|
bundleId,
|
|
@@ -755,53 +808,22 @@ async function acquireIosArtifact({ root, logFile, recipe, physical, configurati
|
|
|
755
808
|
},
|
|
756
809
|
completeUploads: async () => {
|
|
757
810
|
const uploadWasAbandoned = await finishIosUpload(uploadPending, remote, phase, note);
|
|
758
|
-
const outcome = providerUploadOutcome(providerUpload ? await providerUpload : null, providerName);
|
|
811
|
+
const outcome = providerUploadOutcome(providerUpload ? await providerUpload : null, providerName, context.env);
|
|
759
812
|
if (outcome) {
|
|
760
813
|
if (outcome.warn) note(chalk.yellow(phaseLine("cache", outcome.line)));
|
|
761
814
|
else phase("cache", outcome.line);
|
|
762
815
|
}
|
|
763
816
|
return abandonedRemote || uploadWasAbandoned;
|
|
764
817
|
},
|
|
765
|
-
release:
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
artifact
|
|
771
|
-
};
|
|
772
|
-
} catch (error) {
|
|
773
|
-
if (error instanceof OffloadRefusal) {
|
|
774
|
-
const refusal = error;
|
|
775
|
-
return {
|
|
776
|
-
ok: false,
|
|
777
|
-
failure: {
|
|
778
|
-
code: refusal.code,
|
|
779
|
-
message: refusal.message,
|
|
780
|
-
remedy: refusal.remedy,
|
|
781
|
-
build: {
|
|
782
|
-
...buildFailure,
|
|
783
|
-
buildMachine,
|
|
784
|
-
...builtOn ? { builtOn } : {}
|
|
785
|
-
}
|
|
786
|
-
},
|
|
787
|
-
compilationCache
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
if (error instanceof IosRecipeRefusal) return {
|
|
791
|
-
ok: false,
|
|
792
|
-
failure: {
|
|
793
|
-
...error.failure,
|
|
794
|
-
build: {
|
|
795
|
-
...buildFailure,
|
|
796
|
-
...error.failure.build
|
|
818
|
+
release: async () => {
|
|
819
|
+
try {
|
|
820
|
+
await Promise.allSettled([providerUpload, remote?.provider && "easCli" in remote.provider ? uploadPending : null]);
|
|
821
|
+
} finally {
|
|
822
|
+
acquired.release();
|
|
797
823
|
}
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
throw error;
|
|
802
|
-
} finally {
|
|
803
|
-
if (!transferred) releaseArtifact();
|
|
804
|
-
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
};
|
|
805
827
|
}
|
|
806
828
|
//#endregion
|
|
807
829
|
export { acquireIosArtifact as t };
|