Skip to content

Commit 4989632

Browse files
authored
patch solid to try fix memo undefined under transition bug (#18338)
1 parent d460614 commit 4989632

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"patchedDependencies": {
114114
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
115115
"@openrouter/ai-sdk-provider@1.5.4": "patches/@openrouter%2Fai-sdk-provider@1.5.4.patch",
116-
"@ai-sdk/xai@2.0.51": "patches/@ai-sdk%2Fxai@2.0.51.patch"
116+
"@ai-sdk/xai@2.0.51": "patches/@ai-sdk%2Fxai@2.0.51.patch",
117+
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
117118
}
118119
}

packages/opencode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"@ai-sdk/xai": "2.0.51",
9090
"@aws-sdk/credential-providers": "3.993.0",
9191
"@clack/prompts": "1.0.0-alpha.1",
92+
"@effect/platform-node": "catalog:",
9293
"@gitlab/gitlab-ai-provider": "3.6.0",
9394
"@gitlab/opencode-gitlab-auth": "1.3.3",
9495
"@hono/standard-validator": "0.1.5",
@@ -104,7 +105,6 @@
104105
"@openrouter/ai-sdk-provider": "1.5.4",
105106
"@opentui/core": "0.1.87",
106107
"@opentui/solid": "0.1.87",
107-
"@effect/platform-node": "catalog:",
108108
"@parcel/watcher": "2.5.1",
109109
"@pierre/diffs": "catalog:",
110110
"@solid-primitives/event-bus": "1.1.2",

patches/solid-js@1.9.10.patch

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
diff --git a/Users/brendonovich/github.com/anomalyco/opencode/node_modules/solid-js/.bun-tag-6fcb6b48d6947d2c b/.bun-tag-6fcb6b48d6947d2c
2+
new file mode 100644
3+
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
4+
diff --git a/Users/brendonovich/github.com/anomalyco/opencode/node_modules/solid-js/.bun-tag-b272f631c12927b0 b/.bun-tag-b272f631c12927b0
5+
new file mode 100644
6+
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
7+
diff --git a/dist/dev.cjs b/dist/dev.cjs
8+
index 7104749486e4361e8c4ee7836a8046582cec7aa1..0501eb1ec5d13b81ecb13a5ac1a82db42502b976 100644
9+
--- a/dist/dev.cjs
10+
+++ b/dist/dev.cjs
11+
@@ -764,6 +764,8 @@ function runComputation(node, value, time) {
12+
if (node.updatedAt != null && "observers" in node) {
13+
writeSignal(node, nextValue, true);
14+
} else if (Transition && Transition.running && node.pure) {
15+
+ // On first computation during transition, also set committed value #2046
16+
+ if (!Transition.sources.has(node)) node.value = nextValue;
17+
Transition.sources.add(node);
18+
node.tValue = nextValue;
19+
} else node.value = nextValue;
20+
diff --git a/dist/dev.js b/dist/dev.js
21+
index ea5e4bc2fd4f0b3922a73d9134439529dc81339f..4b3ec07e624d20fdd23d6941a4fdde6d3a78cca3 100644
22+
--- a/dist/dev.js
23+
+++ b/dist/dev.js
24+
@@ -762,6 +762,8 @@ function runComputation(node, value, time) {
25+
if (node.updatedAt != null && "observers" in node) {
26+
writeSignal(node, nextValue, true);
27+
} else if (Transition && Transition.running && node.pure) {
28+
+ // On first computation during transition, also set committed value #2046
29+
+ if (!Transition.sources.has(node)) node.value = nextValue;
30+
Transition.sources.add(node);
31+
node.tValue = nextValue;
32+
} else node.value = nextValue;
33+
diff --git a/dist/solid.cjs b/dist/solid.cjs
34+
index 7c133a2b254678a84fd61d719fbeffad766e1331..2f68c99f2698210cc0bac62f074cc8cd3beb2881 100644
35+
--- a/dist/solid.cjs
36+
+++ b/dist/solid.cjs
37+
@@ -717,6 +717,8 @@ function runComputation(node, value, time) {
38+
if (node.updatedAt != null && "observers" in node) {
39+
writeSignal(node, nextValue, true);
40+
} else if (Transition && Transition.running && node.pure) {
41+
+ // On first computation during transition, also set committed value #2046
42+
+ if (!Transition.sources.has(node)) node.value = nextValue;
43+
Transition.sources.add(node);
44+
node.tValue = nextValue;
45+
} else node.value = nextValue;
46+
diff --git a/dist/solid.js b/dist/solid.js
47+
index 656fd26e7e5c794aa22df19c2377ff5c0591fc29..f08e9f5a7157c3506e5b6922fe2ef991335a80be 100644
48+
--- a/dist/solid.js
49+
+++ b/dist/solid.js
50+
@@ -715,6 +715,8 @@ function runComputation(node, value, time) {
51+
if (node.updatedAt != null && "observers" in node) {
52+
writeSignal(node, nextValue, true);
53+
} else if (Transition && Transition.running && node.pure) {
54+
+ // On first computation during transition, also set committed value #2046
55+
+ if (!Transition.sources.has(node)) node.value = nextValue;
56+
Transition.sources.add(node);
57+
node.tValue = nextValue;
58+
} else node.value = nextValue;

0 commit comments

Comments
 (0)