Commit c77e79f
Smoke handler: also fall back to sibling-of-execPath lookup
Round 10 still failed Windows because the smoke handler in main()
doesn't go through init-node's locateFile callback at all — it
calls Parser.init directly, so my init-node sibling fallback
(rounds 9-10) never runs during the smoke step.
Diagnostic confirmed: at main() time, process.execPath is the disk
path on Windows AND the sibling tree-sitter.wasm exists right next
to it. Pre-init couldn't reach the file (execPath was bunfs at that
phase), so wasmBinary and wasmPath were both empty when smoke ran.
Add the sibling lookup directly to the smoke handler, gated on
those being empty. By main() time the disk path is reliable, so
fs.existsSync(dirname(execPath) + 'tree-sitter.wasm') resolves
correctly and we have something to feed Parser.init.
Real users (no --smoke-tree-sitter flag) still go through the
init-node sibling fallback in the SDK's eager Parser.init — that's
unaffected by this change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 633cddd commit c77e79f
1 file changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
227 | 238 | | |
228 | 239 | | |
229 | | - | |
| 240 | + | |
230 | 241 | | |
231 | | - | |
| 242 | + | |
232 | 243 | | |
233 | 244 | | |
234 | | - | |
| 245 | + | |
235 | 246 | | |
236 | | - | |
| 247 | + | |
237 | 248 | | |
238 | 249 | | |
239 | | - | |
240 | | - | |
241 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
242 | 253 | | |
243 | 254 | | |
244 | 255 | | |
| |||
0 commit comments