Repository navigation
Commit c5a9fd5
committed
fix(core): break filesystem search import cycle
filesystem.ts and filesystem/search.ts import each other and read the
other's exports at module-eval time (FileSystem.node deps include
FileSystemSearch.node). Bun 1.4's bundler resolves this cycle in an
order that leaves FileSystemSearch.node undefined, so every prompt
fails in LayerNode.walk ("undefined is not an object (evaluating
'node.name')") when SystemPrompt.environment builds the location layer.
Bun 1.3.14, the version pinned in packageManager, happens to resolve
the cycle in a working order.
Import FileSystem type-only in search.ts and take Entry and Match
values straight from @opencode-ai/schema/filesystem so the runtime
back-edge is gone. Verified with local builds using both Bun 1.3.14
and 1.4.2.1 parent 4a7d8df commit c5a9fd5
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments