bun
bun copied to clipboard
Chevrotain tutorial tracking issue
Goal: each of the scripts from the Chevrotain tutorial should work
Status: Bun v0.1.5 error with Buffer in step 2
git clone --depth=1 https://github.com/Chevrotain/chevrotain/
cd chevrotain/examples/tutorial/
bun install
cd step2_parsing
diff <(bun main.js) <(node main.js )
Error currently stemming from Lodash:
115 | if (isBuffer(value)) {
^
TypeError: Cannot convert undefined or null to object
at baseClone (/private/tmp/chevrotain/examples/tutorial/node_modules/lodash/_baseClone.js:115:8)
at new CstParser (/private/tmp/chevrotain/examples/tutorial/node_modules/chevrotain/lib/src/parse/parser/parser.js:211:27)
Try to upgrade bun
0.1.8 regressed. All four steps now segfault:
$ git clone --depth=1 https://github.com/Chevrotain/chevrotain/
$ cd chevrotain/examples/tutorial/
$ bun install
$ for i in step*; do (cd $i; bun main.js; cd ..); done
SegmentationFault at 0x0000000000000000
----- bun meta -----
Bun v0.1.8 macOS x64 21.5.0
AutoCommand:
Elapsed: 15ms | User: 14ms | Sys: 7ms
RSS: 14.20MB | Peak: 14.20MB | Commit: 67.11MB | Faults: 0
----- bun meta -----
... (repeated 3 more times) ...
This issue appears to have been fixed, using Bun v1.0.7 it no longer errors. If you still run into this issue after upgrading, please feel free to re-open this issue.