nand2tetris / web-ide

A web-based IDE for https://nand2tetris.org
https://nand2tetris.github.io/web-ide
Other
84 stars 22 forks source link

[bug]: loadAssignment in CLI fails after changes in project file structure #474

Closed kochaika closed 2 months ago

kochaika commented 2 months ago

Tool

General

Interface

None

Contact Details

No response

What happened?

Hi! Here the structure of CHIPS dictionaries were changed. But support for the change was not made in loadAssignment function here.

That's why the error now occurs when attempting to test any component:

❯ nand2tetris grade     
grade /Users/Konstantin.Chaika/WebstormProjects/web-ide-original/test nand2tetris grader!
nand2tetris grade [directory]

Grade all NAND2Tetris projects in a directory tree.

Positionals:
  directory  Path to a folder to grade for nand2tetris projects.
  [string] [default: "/Users/Konstantin.Chaika/WebstormProjects/web-ide-original
                                                                         /test"]

Options:
  --version   Show version number                                      [boolean]
  --help      Show help                                                [boolean]
  --java_ide  When set, look for the java IDE jars in this path and compare both
               runs.                                                    [string]

TypeError: Cannot read properties of undefined (reading 'Or.tst')
    at file:///Users/Konstantin.Chaika/WebstormProjects/web-ide-original/cli/dist/grading.js:14:27
    at async file:///Users/Konstantin.Chaika/WebstormProjects/web-ide-original/simulator/build/projects/runner.js:73:80
    at async Promise.all (index 0)
    at async main (file:///Users/Konstantin.Chaika/WebstormProjects/web-ide-original/cli/dist/grading.js:35:19)
    at async Object.handler (file:///Users/Konstantin.Chaika/WebstormProjects/web-ide-original/cli/dist/index.js:26:22)

Additional Comments

No response

Do you want to try to fix this bug?

Code of Conduct