Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions patches/@alchemy.run__drizzle@2.0.0-beta.85.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/lib/Schema.js b/lib/Schema.js
index c24265b3c23237d846c7b8ff249cb6c23452ec31..744c7bce4de464d472b183b3c9c25987b67b3a5e 100644
--- a/lib/Schema.js
+++ b/lib/Schema.js
@@ -7,6 +7,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
return path;
};
import * as crypto from "node:crypto";
+import * as NodePath from "node:path";
import * as Artifacts from "alchemy/Artifacts";
import { isResolved } from "alchemy/Diff";
import { Interaction } from "alchemy/Interaction";
@@ -150,7 +151,9 @@ Effect.tryPromise({
// A `drizzle-kit/cli` command as an Effect, failing on a thrown or reported error.
const command = (name) => Effect.fn(`drizzleKit.${name}`)(function* (options) {
const cli = yield* importModule("drizzle-kit/cli");
- const result = yield* callDrizzleKit(name, () => cli[name](options));
+ // drizzle-kit reads snapshots as `./${path}`, which breaks an absolute `out`.
+ const kitOptions = { ...options, out: NodePath.relative(process.cwd(), options.out) || "." };
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
+ const result = yield* callDrizzleKit(name, () => cli[name](kitOptions));
if (result.status === "error") {
return yield* new DrizzleKitFailed({ command: name, cause: result.error });
}
15 changes: 15 additions & 0 deletions patches/alchemy@2.0.0-beta.85.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/lib/Artifacts.js b/lib/Artifacts.js
index 648209c089f984dc45bd5eba0788130c9813a1d6..c66b5433427498ced6c91ee7c371ad8295f6205a 100644
--- a/lib/Artifacts.js
+++ b/lib/Artifacts.js
@@ -81,8 +81,8 @@ export const cached = (id) => (eff) => Effect.gen(function* () {
return cached;
}
yield* artifacts.set(id, Deferred.await(deferred));
- const result = yield* eff;
- yield* Deferred.succeed(deferred, result);
+ // Settle waiters on failure too, or every later caller hangs.
+ const result = yield* eff.pipe(Effect.onExit((exit) => Deferred.done(deferred, exit)));
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
yield* artifacts.set(id, result);
return result;
});
Loading
Loading