Description
When attempting to compile a project strictly following the usage instructions in the README, the CLI crashes immediately. The crash occurs during the initialization phase before the compiler even attempts to read the project.yaml file.
The stack trace indicates that the currently published @scratch-fuse/core parser is failing to parse the internal standard library defined in the @scratch-fuse/builtins package.
Steps to Reproduce
- Create a basic FUSE project configuration file (
project.yaml) and a target .fuse script.
- Run the compilation command exactly as documented using
npx:
npx @scratch-fuse/fuse project.yaml result.sb3
- The CLI immediately throws a
ParserError.
Error Log
/Users/a8cde/.nvm/versions/node/v24.13.1/lib/node_modules/@scratch-fuse/fuse/node_modules/@scratch-fuse/core/dist/index.js:1462
throw new import_utility.ErrorList(errors);
^
ErrorList: Multiple errors:
ParserError: Unexpected token Punctuation: { at 1:20-2
at Parser.parsePrimary (/Users/a8cde/.nvm/versions/node/v24.13.1/lib/node_modules/@scratch-fuse/fuse/node_modules/@scratch-fuse/core/dist/index.js:863:11)
...
at Parser.parse (/Users/a8cde/.nvm/versions/node/v24.13.1/lib/node_modules/@scratch-fuse/fuse/node_modules/@scratch-fuse/core/dist/index.js:1462:13)
at /Users/a8cde/.nvm/versions/node/v24.13.1/lib/node_modules/@scratch-fuse/fuse/node_modules/@scratch-fuse/builtins/dist/index.js:1241:26
Root Cause Analysis
I investigated the compiled files in the published npm packages. The ParserError at 1:20 is triggered by the builtin_default string inside @scratch-fuse/builtins/dist/index.js.
The parser fails precisely at this line:
The current version of the @scratch-fuse/core parser appears to reject the = character before the { in namespace declarations (and similarly in block definitions like moveSteps = {).
It seems the syntax rules in the core parser have been updated recently, but the raw FUSE definitions string inside the published builtins package (specifically src/builtin.fuse) was not updated to reflect these new syntax rules. As a result, the published packages on npm are currently incompatible with each other.
Environment
- OS: macOS
- Node.js: v24.13.1
- Execution Method:
npx @scratch-fuse/fuse (Global execution)
Description
When attempting to compile a project strictly following the usage instructions in the README, the CLI crashes immediately. The crash occurs during the initialization phase before the compiler even attempts to read the
project.yamlfile.The stack trace indicates that the currently published
@scratch-fuse/coreparser is failing to parse the internal standard library defined in the@scratch-fuse/builtinspackage.Steps to Reproduce
project.yaml) and a target.fusescript.npx:ParserError.Error Log
Root Cause Analysis
I investigated the compiled files in the published npm packages. The
ParserErrorat1:20is triggered by thebuiltin_defaultstring inside@scratch-fuse/builtins/dist/index.js.The parser fails precisely at this line:
The current version of the
@scratch-fuse/coreparser appears to reject the=character before the{in namespace declarations (and similarly in block definitions likemoveSteps = {).It seems the syntax rules in the
coreparser have been updated recently, but the raw FUSE definitions string inside the publishedbuiltinspackage (specificallysrc/builtin.fuse) was not updated to reflect these new syntax rules. As a result, the published packages on npm are currently incompatible with each other.Environment
npx @scratch-fuse/fuse(Global execution)