Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(device): explain a Command Line Tools-only xcode-select instead of asking for a runtime #14640

Closedishaanko(GitHub profile, opens in a new tab)wants to merge 20 commits intomain fromrefs/pull/14640/headopened View on GitHub

Showing 4 changed files with 74 additions and 10 deletions (loading 2).

x
0 of 4 viewed, 4 left
36 additions and 0 deletionsapps/server/src/device/DeviceMultiHost.test.tsModified
View file
@@ -156,3 +156,39 @@
+​
+it.effect("refreshes the reasons of a host that has no platform it can run", () =>
+ Effect.gen(function* () {
+ let iosReason = "xcrun cannot find simctl";
+ const host: DeviceHost.DeviceHost["Service"] = {
+ id: "local",
+ label: "local",
+ summary: Effect.sync(() => ({
+ id: "local",
+ label: "local",
+ kind: "local",
+ hubInstalled: true,
+ agentDeviceInstalled: true,
+ platforms: [{ platform: "ios", available: false, reason: iosReason }],
+ })),
+ platformAvailability: (platform) => Effect.succeed({ platform, available: false }),
+ ensureReady: () => Effect.die(new Error("a host with no platform must not start")),
+ ensureAgentReady: () => Effect.die(new Error("a host with no platform must not start")),
+ current: Effect.die(new Error("a host with no platform has no hub")),
+ stopAgent: Effect.void,
+ stop: Effect.void,
+ };
+ const service = yield* DeviceService.makeWithHosts(new Map([["local", host]])).pipe(
+ Effect.provide(NodeCrypto.layer),
+ Effect.provideService(
+ HttpClient.HttpClient,