Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): allow slow runtime startup during setup #9510

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/9510/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 7 changed files with 60 additions and 5 deletions (loading 4).

x
0 of 7 viewed, 7 left
25 additions and 1 deletionapps/server/src/provider/Drivers/AntigravityDriver.test.tsModified
View file
@@ -11,10 +11,13 @@
HostProcessPlatform,
} from "@t3tools/shared/hostProcess";
import * as Effect from "effect/Effect";
+import * as Deferred from "effect/Deferred";
+import * as Fiber from "effect/Fiber";
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
import * as Path from "effect/Path";
import * as Schema from "effect/Schema";
+import * as TestClock from "effect/testing/TestClock";
import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
​
import * as BackgroundPolicy from "../../background/BackgroundPolicy.ts";
@@ -108,7 +111,7 @@
const first = yield* makeExecutable("runtime 'one");
const second = yield* makeExecutable("runtime two");
const signedOut = yield* makeExecutable("runtime signed-out", true);
- const controls = { selected: first, failResolution: false };
+ const controls = { selected: first, failResolution: false, beforeAcquire: Effect.void };
const acquisitions: Array<{ binaryPath: string | undefined; path: string | undefined }> = [];
const releases: Array<string | null> = [];
const launches: Array<{
@@ -129,6 +132,7 @@
acquire: (binaryPath, environment) =>
Effect.gen(function* () {
acquisitions.push({ binaryPath, path: environment?.PATH });
+ yield* controls.beforeAcquire;